String initializer handling is changed.
Strings are now considered to be sequences of xU1's. No alignment is done before or after the string other than the alignment done for names and segment type switches.
This commit is contained in:
parent
6e519cf02b
commit
fe922d190d
1 changed files with 3 additions and 10 deletions
|
@ -32,7 +32,7 @@ static int oksizes; /* MES EMX,.,. seen */
|
||||||
|
|
||||||
static enum m_type { CON, ROM, HOLBSS } memtype ;
|
static enum m_type { CON, ROM, HOLBSS } memtype ;
|
||||||
static int valtype; /* Transfer of type information between
|
static int valtype; /* Transfer of type information between
|
||||||
valsize ans putval
|
valsize, inpseudo and putval
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int table3(i) {
|
int table3(i) {
|
||||||
|
@ -243,7 +243,7 @@ int needed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cons_t valsize() {
|
cons_t valsize() {
|
||||||
switch(valtype=table2()) { /* valtype is used by putval */
|
switch(valtype=table2()) { /* valtype is used by putval and inpseudo */
|
||||||
case sp_cst2:
|
case sp_cst2:
|
||||||
return wordsize ;
|
return wordsize ;
|
||||||
case sp_ilb1:
|
case sp_ilb1:
|
||||||
|
@ -252,13 +252,6 @@ cons_t valsize() {
|
||||||
case sp_pnam:
|
case sp_pnam:
|
||||||
return ptrsize ;
|
return ptrsize ;
|
||||||
case sp_scon:
|
case sp_scon:
|
||||||
/* Pad the string with zeros up to the wordsize */
|
|
||||||
while ( strlngth%wordsize ) {
|
|
||||||
if ( strlngth>=MAXSTRING )
|
|
||||||
fatal("string too long") ;
|
|
||||||
string[strlngth]=0 ;
|
|
||||||
strlngth++ ;
|
|
||||||
}
|
|
||||||
return strlngth ;
|
return strlngth ;
|
||||||
case sp_fcon:
|
case sp_fcon:
|
||||||
case sp_icon:
|
case sp_icon:
|
||||||
|
@ -433,7 +426,7 @@ inpseudo(instr_no) {
|
||||||
chkstart() ;
|
chkstart() ;
|
||||||
typealign( ctrunc(instr_no)==ps_rom ? ROM : CON ) ;
|
typealign( ctrunc(instr_no)==ps_rom ? ROM : CON ) ;
|
||||||
while( (objsize=valsize())!=0 ) {
|
while( (objsize=valsize())!=0 ) {
|
||||||
sizealign(objsize) ;
|
if ( valtype!=sp_scon) sizealign(objsize) ;
|
||||||
putval() ;
|
putval() ;
|
||||||
databytes+=objsize ;
|
databytes+=objsize ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue