Commit Graph

2943 Commits

Author SHA1 Message Date
grischka
aeb8f427e2 tccgen: introduce TOK_NEG for unary minus
for floats (currently only).  On x86_64 uses built-in fp
constants (in libtcc1.c) to avoid multiple anonymous
instances.

Also: win32/i386: use __alloca for big struct stack store
- use new function int tok_alloc_const(const char*);
- change alloca86.S to preserve EDX

tccelf.c: fix a warning with 'roinf_use'
2021-01-06 01:44:22 +01:00
herman ten brugge
a5865fab22 text relocation for arm 2021-01-05 19:46:43 +01:00
herman ten brugge
81fec84012 disable nan test for clang 2021-01-05 19:44:06 +01:00
Danny Milosavljevic
77a6a9166d tests: Make arm-asm-testsuite.sh print the failed test cases. 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
0c399306b8 tests: Call arm-asm-testsuite.sh on "asmtest" target. 2021-01-05 17:46:08 +00:00
CodeHz
425bd2a3db fix "invalid token at start of a preprocessor expression" 2021-01-05 17:46:08 +00:00
Christian Jullien
3873f95197 NetBSD: start arm support. WIP 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
0754912ebd arm-asm: Add testsuite 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
29f36a8953 arm-asm: Allow implicit offset 0 in input of asm_single_data_transfer_opcode 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
483625065f arm-asm: Add ldrex, ldrexb, strex, strexb 2021-01-05 17:46:08 +00:00
Danny Milosavljevic
54ef167111 arm-asm: Implement branch to label 2021-01-05 17:46:08 +00:00
Michael Matz
29d8871d61 Implement proper floating point negation
Using "-0.0 - x" still isn't enough if x is a NaN, so bite the bullet
and implement sign-bit flipping via memory.  (It's usually not too bad,
the -0.0-x method also uses memory for the floating point constant).

This way is at least shorter than implementing a new top-level operation
for all backends (a negate) that would be unary.
2021-01-04 04:13:42 +01:00
herman ten brugge
4c9516941c Fix wine
After removing uint64_t from stddef.h the tcc_libm.h now needs to
include stdint.h
2021-01-03 20:12:34 +01:00
herman ten brugge
33d5a9fadb add arm64 relocs 2021-01-03 19:14:53 +01:00
Danny Milosavljevic
78d0f07e32
arm-asm: Improve immediate error message in asm_data_processing_opcode. 2021-01-03 15:54:19 +01:00
Danny Milosavljevic
a7205f738b
arm-asm: Support shift of 0 in asm_shift_opcode 2021-01-03 15:54:19 +01:00
Danny Milosavljevic
9539f51369
Makefile: Split arm64-asm from arm-asm 2021-01-03 15:49:17 +01:00
herman ten brugge
8712b4c9c1 Fix arm64 asm 2021-01-03 11:24:37 +01:00
Danny Milosavljevic
7f98aefddf
arm-asm: Implement subst_asm_operand 2021-01-03 02:34:12 +01:00
Danny Milosavljevic
9a460d3234
arm-asm: Implement asm_compute_constraints 2021-01-03 02:34:12 +01:00
Danny Milosavljevic
795d7d5ce6
arm-asm: Implement asm_gen_code 2021-01-03 02:34:12 +01:00
Danny Milosavljevic
d66c155239
arm-asm: Support bigger immediates for data processing instructions 2021-01-03 02:34:12 +01:00
Danny Milosavljevic
14b7973ab5
arm-asm: Add movw 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
c882d03673
arm-asm: Add movt 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
86cc9c587b
arm-asm: Raise error if asm_data_processing_opcode and asm_shift_opcode try to use PC for register-controlled shifts 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
79567004b4
arm-asm: Raise error if more than two operands are specified on mov, mvn, cmp, cmn, tst, teq 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
612d9d7ae6
arm-asm: Print a warning if asm_binary_opcode is used with SP as operand 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
67b402fda4
arm-asm: Raise an error if asm_binary_opcode is used with PC as operand 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
3a6f3e5f30
arm-asm: Add error case in asm_multiplication_opcode 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
e0cb5184f5
arm-asm: Warn if regset registers are not specified in ascending order 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
49365d563e
arm-asm: Support rotation for sxtb, sxth, uxtb, uxth 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
daaa88ce68
arm-asm: For data processing instructions, support shifts and rotations. 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
abef8f6ca7
arm-asm: Add lsl, lsr, asr, ror, rrx 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
b940d8edb2
arm-asm: Optimize gen_le32 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
b85c3e1595
arm-asm: Add b, bl, bx, blx 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
3b1f06c3b2
arm-asm: Add and, eor, sub, rsb, add, adc, sbc, rsc, tst, teq, cmp, cmn, orr, mov, bic, mvn 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
c7682dd9aa
arm-asm: Add ldr, ldrb, str, strb 2021-01-03 02:34:11 +01:00
Danny Milosavljevic
632b213756
arm-asm: Add stmda, ldmda, stm, ldm, stmia, ldmia, stmdb, ldmdb, stmib, ldmib 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
82663d33bb
arm-asm: Add mul, mla, smull, umull, smlal, umlal 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
c4e13c1ef9
arm-asm: Add clz, sxtb, sxth, uxtb, uxth 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
c9e0c2a543
arm-asm: Add swi 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
b495959e4b
arm-asm: Add push, pop
Also edited tcctok.h to not redefine push, pop
2021-01-03 02:34:10 +01:00
Danny Milosavljevic
c5428cd19c
arm-asm: Add parse_operand, Operand
tccpp: Allow '#' token to reach the assembler.
2021-01-03 02:34:10 +01:00
Danny Milosavljevic
a16678e9f3
arm-asm: Add wfe, wfi 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
aaf052391d
arm-asm: Add nop 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
9d302620c2
arm-asm: Remove asm_error 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
b10824dcdc
arm-asm: Update copyright header 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
f88ded6c2d
arm-asm: Implement asm_parse_regvar and asm_clobber 2021-01-03 02:34:10 +01:00
Danny Milosavljevic
4a6fb47b8d
arm-asm: Publish g, gen_le16, gen_le32 in tcc.h 2021-01-03 02:34:10 +01:00
herman ten brugge
3221cc4a5a Align next section after gnu_ro to pagesize
To allow remapping the ro section the next section must start
on a new page.
2021-01-02 15:17:25 +01:00