diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-03-02 11:20:12 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-02 11:31:20 -0500 |
commit | 55f6353f7adc4d947aac8dfea227fdc4f54ac6d7 (patch) | |
tree | 7a534b5d65ab5f38c820fc4d0bf76715ba86c658 /rts | |
parent | 537ce41c5373a2e6fa8961f0bdca75e887ac45b7 (diff) | |
download | haskell-55f6353f7adc4d947aac8dfea227fdc4f54ac6d7.tar.gz |
SymbolExtras: A bit of spring cleaning
Const-hygiene and use bool when possible.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/linker/SymbolExtras.c | 12 | ||||
-rw-r--r-- | rts/linker/SymbolExtras.h | 8 |
2 files changed, 9 insertions, 11 deletions
diff --git a/rts/linker/SymbolExtras.c b/rts/linker/SymbolExtras.c index 468b3a9081..73f219f428 100644 --- a/rts/linker/SymbolExtras.c +++ b/rts/linker/SymbolExtras.c @@ -103,7 +103,7 @@ int ocAllocateSymbolExtras( ObjectCode* oc, int count, int first ) #ifndef arm_HOST_ARCH -SymbolExtra* makeSymbolExtra( ObjectCode* oc, +SymbolExtra* makeSymbolExtra( ObjectCode const* oc, unsigned long symbolNumber, unsigned long target ) { @@ -169,18 +169,16 @@ SymbolExtra* makeSymbolExtra( ObjectCode* oc, */ /* Produce a jump island for ARM/Thumb interworking */ -SymbolExtra* makeArmSymbolExtra( ObjectCode* oc, +SymbolExtra* makeArmSymbolExtra( ObjectCode const* oc, unsigned long symbolNumber, unsigned long target, - int fromThumb, - int toThumb ) + bool fromThumb, + bool toThumb ) { - SymbolExtra *extra; - ASSERT( symbolNumber >= oc->first_symbol_extra && symbolNumber - oc->first_symbol_extra < oc->n_symbol_extras); - extra = &oc->symbol_extras[symbolNumber - oc->first_symbol_extra]; + SymbolExtra *extra = &oc->symbol_extras[symbolNumber - oc->first_symbol_extra]; // Make sure instruction mode bit is set properly if (toThumb) diff --git a/rts/linker/SymbolExtras.h b/rts/linker/SymbolExtras.h index c89777536f..5e2a6d0208 100644 --- a/rts/linker/SymbolExtras.h +++ b/rts/linker/SymbolExtras.h @@ -11,13 +11,13 @@ int ocAllocateSymbolExtras( ObjectCode* oc, int count, int first ); #ifdef arm_HOST_ARCH -SymbolExtra* makeArmSymbolExtra( ObjectCode* oc, +SymbolExtra* makeArmSymbolExtra( ObjectCode const* oc, unsigned long symbolNumber, unsigned long target, - int fromThumb, - int toThumb ); + bool fromThumb, + bool toThumb ); #else -SymbolExtra* makeSymbolExtra( ObjectCode* oc, +SymbolExtra* makeSymbolExtra( ObjectCode const* oc, unsigned long symbolNumber, unsigned long target ); |