aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-05-11 23:47:02 +0200
committerMichael Matz <matz@suse.de>2016-05-11 23:47:02 +0200
commitb9f01dffc61d41868157d3cc31f460d952502779 (patch)
tree670d676fb8ef8d052443c9bb84e9520dbea37bdb /tests
parentf3cee9ceffb2c11872df20b8a8e4d2188fe81832 (diff)
downloadtinycc-b9f01dffc61d41868157d3cc31f460d952502779.tar.gz
tinycc-b9f01dffc61d41868157d3cc31f460d952502779.tar.bz2
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).
Diffstat (limited to 'tests')
-rw-r--r--tests/asmtest.S10
1 files changed, 10 insertions, 0 deletions
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__