aboutsummaryrefslogtreecommitdiff
path: root/tests/asmtest.S
diff options
context:
space:
mode:
authorgrischka <grischka>2016-10-02 01:38:22 +0200
committergrischka <grischka>2016-10-02 01:39:14 +0200
commitc2ad11ac70b9ae2010eb63d5eaf77ede0168ca41 (patch)
treec81d6cfa09bfcf1d9f0b433bb5e5846582cce702 /tests/asmtest.S
parentf350487e1e5d4606c8b1508f920b7325c3c50bc1 (diff)
downloadtinycc-c2ad11ac70b9ae2010eb63d5eaf77ede0168ca41.tar.gz
tinycc-c2ad11ac70b9ae2010eb63d5eaf77ede0168ca41.tar.bz2
tccgen: fix long long -> char/short cast
This was causing assembler bugs in a tcc compiled by itself at i386-asm.c:352 when ExprValue.v was changed to uint64_t: if (op->e.v == (int8_t)op->e.v) op->type |= OP_IM8S; A general test case: #include <stdio.h> int main(int argc, char **argv) { long long ll = 4000; int i = (char)ll; printf("%d\n", i); return 0; } Output was "4000", now "-96". Also: add "asmtest2" as asmtest with tcc compiled by itself
Diffstat (limited to 'tests/asmtest.S')
-rw-r--r--tests/asmtest.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/asmtest.S b/tests/asmtest.S
index fd0629c..d7d6800 100644
--- a/tests/asmtest.S
+++ b/tests/asmtest.S
@@ -696,6 +696,7 @@ int $0x10
inc %eax
#endif
+#ifndef _WIN32
ft1: ft2: ft3: ft4: ft5: ft6: ft7: ft8: ft9:
xor %eax, %eax
ret
@@ -708,6 +709,7 @@ ft1: ft2: ft3: ft4: ft5: ft6: ft7: ft8: ft9:
.type ft6,@function
.type ft7,%function
.type ft8,"function"
+#endif
pause
.rept 6