git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3956
4a8a32a2-be11-0410-ad9d-
d568d2c75423
finish:
if (offset < rsize)
{
+ char *source;
+
+ if (SPEC_USIGN (etype))
+ source = zero;
+ else
+ {
+ /* signed bitfield: sign extension with 0x00 or 0xff */
+ emitcode ("rlc", "a");
+ emitcode ("subb", "a,acc");
+
+ source = "a";
+ }
rsize -= offset;
while (rsize--)
- aopPut (result, zero, offset++, isOperandVolatile (result, FALSE));
+ aopPut (result, source, offset++, isOperandVolatile (result, FALSE));
}
}