diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-02-23 23:05:07 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-02-23 23:05:07 -0500 |
commit | 73a89a7cdaea34c80fc5d78e1e3e230204fb6826 (patch) | |
tree | 2f9199ae42a80b55bf03da0259d76e347bb70f4d | |
parent | ce7dc8b6fbdc3d59452a87ff673001e2659f80c5 (diff) |
misc
-rw-r--r-- | simplex86.c | 24 | ||||
-rw-r--r-- | testsuite.c | 3 |
2 files changed, 14 insertions, 13 deletions
diff --git a/simplex86.c b/simplex86.c index 92a3bcd..4d37a15 100644 --- a/simplex86.c +++ b/simplex86.c @@ -239,8 +239,8 @@ static const variant_t variants[] = { I_mov, { A_RM, A_R }, F_386, E_MR, 0x89 }, { I_mov, { A_R, A_RM }, F_386, E_RM, 0x8b }, /* movabs is simply mov in the Intel manuals, but we need - * three operands to represent a 64 bit immediate, so it has to have a - * different name, and movabs is what GNU as uses. + * three operands to represent a 64 bit immediate, so it has + * to have a different name, and movabs is what GNU as uses. */ { I_movabs, { A_R64, A_I32, A_I32 }, F_386, E_O, 0xb8 }, @@ -270,9 +270,6 @@ static const variant_t variants[] = ALU_OPS (I_xor, 6), ALU_OPS (I_cmp, 7), - /* Test is almost, but not quite an ALU op */ - { I_test, { (A_R8 | A_MEM), A_R8 }, F_386, E_MR, 0x84 }, - { I_test, { A_RM, A_R }, F_386, E_MR, 0x85 }, { I_test, { A_AL, A_I8 }, F_386, E_NP, 0xa8 }, { I_test, { A_AX, A_I16 }, F_386, E_NP, 0xa9 }, { I_test, { A_EAX, A_I32 }, F_386, E_NP, 0xa9 }, @@ -281,6 +278,9 @@ static const variant_t variants[] = { I_test, { A_RM16, A_I16 }, F_386, E_M, 0xf7, 0 }, { I_test, { A_RM32, A_I32 }, F_386, E_M, 0xf7, 0 }, { I_test, { A_RM64, A_I32 }, F_386, E_M, 0xf7, 0 }, + { I_test, { (A_R8 | A_MEM), A_R8 }, F_386, E_MR, 0x84 }, + { I_test, { A_RM, A_R }, F_386, E_MR, 0x85 }, + { I_test, { A_R, A_RM }, F_386, E_RM, 0x85 }, #define SHIFT_OPS(name, opc) \ { name, { A_RM, A_1 }, F_386, E_M, 0xd1, opc }, \ @@ -1071,13 +1071,13 @@ detect_features (assembler_t *as) I_test, esi, IMM (F_FXSR), I_jz, LABEL ("no_DAZ"), #if defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) - I_movabs, rdi, IMM64 (FXSAVE_AREA), - I_fxsave, PTR (rdi), - I_test, DWORD_PTR + BASE(rdi, 28), IMM(1 << 6), + I_movabs, rax, IMM64 (FXSAVE_AREA), + I_fxsave, PTR (rax), + I_test, DWORD_PTR + BASE(rax, 28), IMM(1 << 6), #else - I_mov, edi, IMM32 (FXSAVE_AREA), - I_fxsave, PTR (edi), - I_test, DWORD_PTR + BASE(edi, 28), IMM(1 << 6), + I_mov, eax, IMM (FXSAVE_AREA), + I_fxsave, PTR (eax), + I_test, DWORD_PTR + BASE(eax, 28), IMM(1 << 6), #endif I_jz, LABEL ("no_DAZ"), I_or, esi, IMM (F_DAZ), @@ -1105,7 +1105,7 @@ detect_features (assembler_t *as) I_pop, ebx, I_ret, - DEFINE_VALUE64("printf", (uint64_t)printf), + DEFINE_VALUE64("printf", (uintptr_t)printf), END_ASM(); c = assembler_link (as, fragment, NULL); diff --git a/testsuite.c b/testsuite.c index dba67ba..96c250a 100644 --- a/testsuite.c +++ b/testsuite.c @@ -413,7 +413,8 @@ main () * support multibyte nop. We need a way to force the assembler to * pretend that the machine has or hasn't some specific features. * - * Also we will produce different output on 32 vs 64 bit. + * Also we will produce different output on 32 vs 64 bit, at least + * due to differences in default address size. */ success &= run_test (as, "test_crc32", test_crc32, 0x3ce8ed36 ); success &= run_test (as, "avx_supported", avx_supported, 0xeeaec30c); |