History

Inverse last intr test so that function always returns. This prevents warning as found with gcc 8.3 and it matches other function styles doing the same in ARM generator.

Christian Jullien committed 7 years ago

Commit a4997bf1 parent a9340dd1 file · +3 −3Browse files

Unified · Split

arm-gen.c+3−3
@@ -404,9 +404,9 @@ static uint32_t intr(int r) · 403 unmodified lines
404 return 12;404 return 12;
405 if(r >= TREG_R0 && r <= TREG_R3)405 if(r >= TREG_R0 && r <= TREG_R3)
406 return r - TREG_R0;406 return r - TREG_R0;
407 if (r >= TREG_SP && r <= TREG_LR)407 if (!(r >= TREG_SP && r <= TREG_LR))
408 return r + (13 - TREG_SP);408 tcc_error("compiler error! register %i is no int register",r);
409 tcc_error("compiler error! register %i is no int register",r);409 return r + (13 - TREG_SP);
410}410}
411 411
412static void calcaddr(uint32_t *base, int *off, int *sgn, int maxoff, unsigned shift)412static void calcaddr(uint32_t *base, int *off, int *sgn, int maxoff, unsigned shift)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t