- case 2:
- dbuf_tprintf (oBuf, "\t!dw !constword\n",ival);
- break;
- case 4:
- dbuf_tprintf (oBuf, "\t!dw !constword,!constword\n",
- (ival >> 16) & 0xffff, (ival & 0xffff));
- break;
- }
+ if (size)
+ {
+ if (bit_length > 8)
+ size += (bit_length + 7) / 8;
+ }
+ else
+ size = (bit_length + 7) / 8;
+
+ /* check if the literal value is within bounds */
+ if (val &&
+ checkConstantRange (lsym->etype, val->etype, '=', FALSE) == CCR_OVL &&
+ !options.lessPedantic)
+ {
+ werror (W_LIT_OVERFLOW);
+ }
+
+ ival |= (ulFromVal (val) & ((1ul << bit_length) - 1ul)) << SPEC_BSTR (lsym->etype);
+ lilist = lilist ? lilist->next : NULL;
+ }
+ lsym = lsym->next;
+ }
+
+ switch (size)
+ {
+ case 1:
+ dbuf_tprintf (oBuf, "\t!db !constbyte\n", ival);
+ break;
+
+ case 2:
+ dbuf_tprintf (oBuf, "\t!dw !constword\n", ival);
+ break;
+
+ case 4:
+ dbuf_tprintf (oBuf, "\t!dw !constword,!constword\n",
+ (ival >> 16) & 0xffff, (ival & 0xffff));
+ break;
+ }