comparison gen/asm-x86-64.h @ 929:8ff08961da72

Changed this file to add 'naked' and a couple other missing instructions
author wilsonk@ubuntu
date Tue, 03 Feb 2009 12:43:03 -0700
parents 0ea8bdfe4405
children acd745fbdb66
comparison
equal deleted inserted replaced
928:1b10a9c6e3e8 929:8ff08961da72
614 { "adc", Op_UpdSrcF }, 614 { "adc", Op_UpdSrcF },
615 615
616 { "add", Op_DstSrcNT }, //Op_UpdSrcF }, 616 { "add", Op_DstSrcNT }, //Op_UpdSrcF },
617 { "addpd", Op_DstSrcSSE }, 617 { "addpd", Op_DstSrcSSE },
618 { "addps", Op_DstSrcSSE }, 618 { "addps", Op_DstSrcSSE },
619 { "addq", Op_DstSrcSSE },
619 { "addsd", Op_DstSrcSSE }, 620 { "addsd", Op_DstSrcSSE },
620 { "addss", Op_DstSrcSSE }, 621 { "addss", Op_DstSrcSSE },
621 { "addsubpd", Op_DstSrcSSE }, 622 { "addsubpd", Op_DstSrcSSE },
622 { "addsubps", Op_DstSrcSSE }, 623 { "addsubps", Op_DstSrcSSE },
623 { "and", Op_UpdSrcF }, 624 { "and", Op_UpdSrcF },
949 { "minps", Op_DstSrcSSE }, 950 { "minps", Op_DstSrcSSE },
950 { "minsd", Op_DstSrcSSE }, 951 { "minsd", Op_DstSrcSSE },
951 { "minss", Op_DstSrcSSE }, 952 { "minss", Op_DstSrcSSE },
952 { "monitor", Op_0 }, 953 { "monitor", Op_0 },
953 { "mov", Op_DstSrc }, 954 { "mov", Op_DstSrc },
954 { "movb", Op_DstSrcNT },
955 { "movapd", Op_DstSrcSSE }, 955 { "movapd", Op_DstSrcSSE },
956 { "movaps", Op_DstSrcSSE }, 956 { "movaps", Op_DstSrcSSE },
957 { "movb", Op_DstSrcNT },
957 { "movd", Op_DstSrcNT }, // also mmx and sse 958 { "movd", Op_DstSrcNT }, // also mmx and sse
958 { "movddup", Op_DstSrcSSE }, 959 { "movddup", Op_DstSrcSSE },
959 { "movdq2q", Op_DstSrcNT }, // mmx/sse 960 { "movdq2q", Op_DstSrcNT }, // mmx/sse
960 { "movdqa", Op_DstSrcSSE }, 961 { "movdqa", Op_DstSrcSSE },
961 { "movdqu", Op_DstSrcSSE }, 962 { "movdqu", Op_DstSrcSSE },
962 { "movhlps", Op_DstSrcSSE }, 963 { "movhlps", Op_DstSrcSSE },
963 { "movhpd", Op_DstSrcSSE }, 964 { "movhpd", Op_DstSrcSSE },
964 { "movhps", Op_DstSrcSSE }, 965 { "movhps", Op_DstSrcSSE },
966 { "movl", Op_DstSrc },
965 { "movlhps", Op_DstSrcSSE }, 967 { "movlhps", Op_DstSrcSSE },
966 { "movlpd", Op_DstSrcSSE }, 968 { "movlpd", Op_DstSrcSSE },
967 { "movlps", Op_DstSrcSSE }, 969 { "movlps", Op_DstSrcSSE },
968 { "movmskpd",Op_DstSrcSSE }, 970 { "movmskpd",Op_DstSrcSSE },
969 { "movmskps",Op_DstSrcSSE }, 971 { "movmskps",Op_DstSrcSSE },
992 { "mulpd", Op_DstSrcSSE }, 994 { "mulpd", Op_DstSrcSSE },
993 { "mulps", Op_DstSrcSSE }, 995 { "mulps", Op_DstSrcSSE },
994 { "mulsd", Op_DstSrcSSE }, 996 { "mulsd", Op_DstSrcSSE },
995 { "mulss", Op_DstSrcSSE }, 997 { "mulss", Op_DstSrcSSE },
996 { "mwait", Op_0 }, 998 { "mwait", Op_0 },
999 { "naked", Op_Naked },
997 { "neg", Op_UpdF }, 1000 { "neg", Op_UpdF },
998 { "nop", Op_0 }, 1001 { "nop", Op_0 },
999 { "not", Op_Upd }, 1002 { "not", Op_Upd },
1000 { "or", Op_UpdSrcF }, 1003 { "or", Op_UpdSrcF },
1001 { "orpd", Op_DstSrcSSE }, 1004 { "orpd", Op_DstSrcSSE },
1049 { "pmulhrsw", Op_DstSrcMMX }, 1052 { "pmulhrsw", Op_DstSrcMMX },
1050 { "pmulhuw", Op_DstSrcMMX }, 1053 { "pmulhuw", Op_DstSrcMMX },
1051 { "pmulhw", Op_DstSrcMMX }, 1054 { "pmulhw", Op_DstSrcMMX },
1052 { "pmullw", Op_DstSrcMMX }, 1055 { "pmullw", Op_DstSrcMMX },
1053 { "pmuludq", Op_DstSrcMMX }, // also sse 1056 { "pmuludq", Op_DstSrcMMX }, // also sse
1054 { "pop", Op_DstW },
1055 { "popf", Op_SizedStack }, // rewrite the insn with a special case 1057 { "popf", Op_SizedStack }, // rewrite the insn with a special case
1056 { "popfq", Op_SizedStack }, 1058 { "popfq", Op_SizedStack },
1057 { "popq", Op_push }, 1059 { "popq", Op_push },
1058 { "por", Op_DstSrcMMX }, 1060 { "por", Op_DstSrcMMX },
1059 { "prefetchnta", Op_SrcMemNT }, 1061 { "prefetchnta", Op_SrcMemNT },
1093 { "punpckhwd", Op_DstSrcMMX }, 1095 { "punpckhwd", Op_DstSrcMMX },
1094 { "punpcklbw", Op_DstSrcMMX }, 1096 { "punpcklbw", Op_DstSrcMMX },
1095 { "punpckldq", Op_DstSrcMMX }, 1097 { "punpckldq", Op_DstSrcMMX },
1096 { "punpcklqdq",Op_DstSrcMMX }, 1098 { "punpcklqdq",Op_DstSrcMMX },
1097 { "punpcklwd", Op_DstSrcMMX }, 1099 { "punpcklwd", Op_DstSrcMMX },
1098 { "push", Op_push },
1099 { "pushf", Op_SizedStack }, 1100 { "pushf", Op_SizedStack },
1100 { "pushfq", Op_SizedStack }, 1101 { "pushfq", Op_SizedStack },
1101 { "pushq", Op_push }, 1102 { "pushq", Op_push },
1102 { "pxor", Op_DstSrcMMX }, 1103 { "pxor", Op_DstSrcMMX },
1103 { "rcl", Op_Shift }, // limited src operands -- change to shift 1104 { "rcl", Op_Shift }, // limited src operands -- change to shift
1186 { "stosq", Op_stosX }, 1187 { "stosq", Op_stosX },
1187 { "str", Op_DstMemNT }, // also r16 1188 { "str", Op_DstMemNT }, // also r16
1188 { "sub", Op_UpdSrcF }, 1189 { "sub", Op_UpdSrcF },
1189 { "subpd", Op_DstSrcSSE }, 1190 { "subpd", Op_DstSrcSSE },
1190 { "subps", Op_DstSrcSSE }, 1191 { "subps", Op_DstSrcSSE },
1192 { "subq", Op_DstSrcSSE },
1191 { "subsd", Op_DstSrcSSE }, 1193 { "subsd", Op_DstSrcSSE },
1192 { "subss", Op_DstSrcSSE }, 1194 { "subss", Op_DstSrcSSE },
1193 { "swapgs", Op_DstSrcSSE }, 1195 { "swapgs", Op_DstSrcSSE },
1194 { "sysenter",Op_0 }, 1196 { "sysenter",Op_0 },
1195 { "sysexit", Op_0 }, 1197 { "sysexit", Op_0 },
1553 if (!vd->isDataseg()) 1555 if (!vd->isDataseg())
1554 { 1556 {
1555 stmt->error("only global variables can be referenced by identifier in naked asm"); 1557 stmt->error("only global variables can be referenced by identifier in naked asm");
1556 break; 1558 break;
1557 } 1559 }
1558
1559 // osx needs an extra underscore
1560 if (global.params.os == OSMacOSX)
1561 insnTemplate->writestring("_");
1562 1560
1563 // print out the mangle 1561 // print out the mangle
1564 insnTemplate->writestring(vd->mangle()); 1562 insnTemplate->writestring(vd->mangle());
1565 vd->nakedUse = true; 1563 vd->nakedUse = true;
1566 break; 1564 break;