trip report: Tiny C Compiler 0.9.27 (Miscellaneous)
Hello bencollver,
Glad you are making progress.
> When c = 0xfffffff8, TCC takes the "short reference" branch while Watcom
> takes the "else" branch. What is this if statement actually
> testing?
TCC directly generates machine code, and this is apparently where it emits a ModR/M byte and an address displacement for certain operand pairs (e.g. -0x10(%ebp), %eax).
The conditional is supposed to test if the displacement (here -0x10) is in the range -128 to +127. If it is, then TCC can opt to encode a short 1-byte displacement rather than a 4-byte one.
Thank you!
---
https://codeberg.org/tkchia · https://disroot.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
Complete thread:
- trip report: Tiny C Compiler 0.9.27 - bencollver, 04.02.2026, 17:02 (Miscellaneous)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- trip report: Tiny C Compiler 0.9.27 - tkchia, 04.02.2026, 17:55
- trip report: Tiny C Compiler 0.9.27 - bencollver, 04.02.2026, 18:48
- trip report: Tiny C Compiler 0.9.27 - Japheth, 04.02.2026, 21:12
- trip report: Tiny C Compiler 0.9.27 - bencollver, 04.02.2026, 21:44
- trip report: Tiny C Compiler 0.9.27 - bretjohn, 05.02.2026, 22:24
- trip report: Tiny C Compiler 0.9.27 - Rugxulo, 05.02.2026, 23:09
- trip report: Tiny C Compiler 0.9.27 - bretjohn, 06.02.2026, 01:59
- trip report: Tiny C Compiler 0.9.27 - Rugxulo, 05.02.2026, 23:09
- trip report: Tiny C Compiler 0.9.27 - bencollver, 04.02.2026, 21:38
- trip report: Tiny C Compiler 0.9.27 - tkchia, 05.02.2026, 16:44
- trip report: Tiny C Compiler 0.9.27 - bencollver, 05.02.2026, 18:34
- trip report: Tiny C Compiler 0.9.27 - bencollver, 05.02.2026, 22:22
- trip report: Tiny C Compiler 0.9.27 - tkchia, 05.02.2026, 23:13
- trip report: Tiny C Compiler 0.9.27 - Rugxulo, 05.02.2026, 23:16
- trip report: Tiny C Compiler 0.9.27 - tkchia, 05.02.2026, 23:18
- trip report: Tiny C Compiler 0.9.27 - tkchia, 06.02.2026, 23:45
- trip report: Tiny C Compiler 0.9.27 - bencollver, 05.02.2026, 22:22
- trip report: Tiny C Compiler 0.9.27 - bencollver, 05.02.2026, 18:34
- trip report: Tiny C Compiler 0.9.27 - tkchia, 05.02.2026, 16:44
- trip report: Tiny C Compiler 0.9.27 - Japheth, 04.02.2026, 21:12
- trip report: Tiny C Compiler 0.9.27 - bencollver, 04.02.2026, 18:48
- trip report: Tiny C Compiler 0.9.27 - bencollver, 11.02.2026, 00:44
- trip report: Tiny C Compiler 0.9.27 - Rugxulo, 11.02.2026, 01:42
- trip report: Tiny C Compiler 0.9.27 - bencollver, 11.02.2026, 02:06
- trip report: Tiny C Compiler 0.9.27 - Rugxulo, 11.02.2026, 01:42
- trip report: Tiny C Compiler 0.9.27 - tkchia, 04.02.2026, 17:55
Mix view