From b9f01dffc61d41868157d3cc31f460d952502779 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 11 May 2016 23:47:02 +0200 Subject: x86-64-asm: Clean up 64bit immediate support Fix it to actually be able to parse 64bit immediates (enlarge operand value type). Then, generally there's no need for accepting IM64 anywhere, except in the 0xba+r mov opcodes, so OP_IM is unnecessary, as is OPT_IMNO64. Improve the generated code a bit by preferring the 0xc7 opcode for im32->reg64, instead of the im64->reg64 form (which we therefore hardcode). --- tests/asmtest.S | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/asmtest.S') diff --git a/tests/asmtest.S b/tests/asmtest.S index 985d824..3589f33 100644 --- a/tests/asmtest.S +++ b/tests/asmtest.S @@ -46,6 +46,16 @@ movl %eax, 0x100(%ebx,%edx,2) movl 0x100(%ebx,%edx,2), %edx movw %ax, 0x100(%ebx,%edx,2) +movw $0x1122,%si +movl $0x112233,%edx +#ifdef __x86_64__ +mov $0x11223344,%rbx +movq $0x11223344,%rbx +mov $0x1122334455,%rbx +movq $0x1122334455,%rbx +movl $0x11334455,(%rbx) +#endif + mov %eax, 0x12(,%edx,2) #ifdef __i386__ -- cgit v1.3.1