mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-09-02 15:02:51 +08:00
Disable all __sfr32 due to bug SDCC 4070 and add workarounds.
Generate wrong address for `a4` location. Both on read from and write to a __sfr32 variable. Workaround: Use two __sfr16 instead of one __sfr32. We still get some optimalizations / better code gen.
This commit is contained in:
+7
-2
@@ -5,8 +5,13 @@ __sfr16 __at(0xa2a3) SFR_REG_ADDR_U16;
|
||||
__sfr __at(0xa2) SFR_REG_ADDRH;
|
||||
__sfr __at(0xa3) SFR_REG_ADDRL;
|
||||
__sfr16 __at(0xa6a7) SFR_DATA_U16;
|
||||
__sfr32 __at(0xa4a5a6a7) SFR_DATA_U32;
|
||||
__sfr32 __at(0xa7a6a5a4) SFR_DATA_U32LE;
|
||||
// Disabling until the SDCC bug #4070 is fixed.
|
||||
// Generate wrong address for `a4` location.
|
||||
// Both read from and write to `SFR_DATA_U32`.
|
||||
// __sfr32 __at(0xa4a5a6a7) SFR_DATA_U32;
|
||||
// __sfr32 __at(0xa7a6a5a4) SFR_DATA_U32LE;
|
||||
// This is the upper part of the U32 as a workaround for SDCC bug #4070.
|
||||
__sfr16 __at(0xa4a5) SFR_DATA_U16_UPPER;
|
||||
__sfr __at(0xa4) SFR_DATA_24;
|
||||
__sfr __at(0xa5) SFR_DATA_16;
|
||||
__sfr __at(0xa6) SFR_DATA_8;
|
||||
|
||||
Reference in New Issue
Block a user