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
Christian Jullien
b147a37c23
Remove useless [u]intN_t definitions from stddef.h
2021-01-02 11:23:26 +01:00
Christian Jullien
c9fe8fe470
Yet another int64_t/uint64_t definition fix. For wine this time.
2021-01-02 05:58:46 +01:00
herman ten brugge
2633c30fb4
riscv64 update
...
implement load/store to constant address
use VT_LLONG instead of VT_PTR in register passing
fix bound checking problem with small structs
enable riscv tests in tests/tcctest.c and tests/tests2/119_random_stuff.c
2021-01-01 20:36:57 +01:00
Christian Jullien
9a2a05ba1e
*BSD: fix extra #endif
2021-01-01 16:01:03 +01:00
Christian Jullien
33257c6439
*BSD: protect against incompatible redefinitions of int64_t/uint64_t.
2021-01-01 08:50:13 +01:00
herman ten brugge
8db839cc85
FreeBSD32 struct return
2020-12-31 06:48:14 +01:00
herman ten brugge
9d49883895
update clang warning
2020-12-31 06:39:56 +01:00
grischka
ea82d0826d
tccpp: cleanup target-os defines
...
moved target_machine defines to the <target>-gen.c files.
Also:
- c2str.c moved into conftest.c
- tccdefs.h ; defined(__TINYC__) && !defined(_LOCORE) removed
(in tinycc __TINYC__ is always defined and _LO... is never.)
- stddef.h : too many #ifdefs, removed
- tccgen.c:stabs: support win32 long doubles aka doubles.
- win32: math.h/tcc_libm.h: fix pointer mismatch in modfl
- tccpp.c: increment include_stack_ptr after the file was
actually found otherwise it would print
"in file included from <itself>: file not found..."
2020-12-31 02:03:31 +01:00
Michael Matz
d784b28877
No need for sm_table.size entry
...
the sh_size input member is reliable, we don't need to duplicate
it in the section mapping info.
2020-12-31 01:21:52 +01:00
Michael Matz
b117088a91
Explain some reloc hackery
...
just changes a comment; it's not specific to __dso_handle, but general
to all hidden defined symbols for shared libraries.
2020-12-31 00:54:00 +01:00
Michael Matz
60eac659d4
fix cross compiler compilation
...
{l,}bounds_section is only conditionally defined.
2020-12-31 00:16:23 +01:00
herman ten brugge
cf10c1db66
Fix clang warnings
2020-12-30 19:12:05 +01:00
herman ten brugge
85b6efbf0c
Real fix include SHT_NOTE sections everywhere
...
Thinko in last commit
2020-12-30 18:23:43 +01:00
herman ten brugge
766bd82032
Fix include SHT_NOTE sections everywhere
2020-12-30 16:24:15 +01:00
herman ten brugge
0821940e26
text relocation for netbsd
...
netbsd does not allow text relocations in text segment.
tcc.h:
- Add data_ro_section
- Fix typo rela.plt
tccelf.c:
- Add data_ro_section
- Make bounds_section/lbounds_section rw
- Add GNU_RELRO section for data_ro_section/bounds_section/lbounds_section
- Fix relocation for __dso_handle in atexit()
tccgen.c:
- Use data_ro_section
x86_64-gen.c:
- Use R_X86_64_PC32 instead of R_X86_64_64 for bounds checking
tests/Makefile, tests/tests2/Makefile
- Enable dll tests for netbsd
2020-12-30 14:08:06 +01:00
Christian Jullien
c13c434383
Fix warnings detected by clang when compiling c2str.
2020-12-30 08:57:30 +01:00
Michael Matz
cc40305a12
Fix errors with parallel make
...
seen when doing 'make -j i386-tcc tcc', as explained in the comment.
2020-12-25 02:10:43 +01:00
Christian Jullien
16ed67537c
NetBSD: longjmp(jmp_buf, 0) is not supported.
2020-12-24 09:29:25 +01:00
Christian Jullien
b9db7c90ee
NetBSD: arm64 prevent use of __asm.
2020-12-24 07:31:52 +01:00
Michael Matz
1032e7175a
ELF: include SHT_NOTE sections everywhere
...
... not just on the BSDs. Sometimes e.g. .note.ABI-tag is allocated
and other sections might contain relocations referring to symbols in
them. TCC doesn't do any special processing to them, like merging
or somesuch, it just pastes them all together in normal link-editing
behaviour.
(Seen on a recent openSUSE with glibc 2.32, when the crt1.o file
contains debug information)
2020-12-24 07:01:04 +01:00
Christian Jullien
b56099aeb4
NetBSD: arm64 fix int64_t/uint64_t definitions.
2020-12-24 06:50:48 +01:00