Mercurial > projects > ldc
comparison gen/asm-x86-32.h @ 1097:4450834402e2
Fix FS:4 problem for x32
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Wed, 11 Mar 2009 12:13:41 -0400 |
parents | d6bd818212de |
children | 51543303f768 |
comparison
equal
deleted
inserted
replaced
1096:25d3aaf9e058 | 1097:4450834402e2 |
---|---|
2057 | 2057 |
2058 use_star = opTakesLabel();//opInfo->takesLabel(); | 2058 use_star = opTakesLabel();//opInfo->takesLabel(); |
2059 | 2059 |
2060 if ( operand->segmentPrefix != Reg_Invalid || operand->constDisplacement ) | 2060 if ( operand->segmentPrefix != Reg_Invalid || operand->constDisplacement ) |
2061 { | 2061 { |
2062 insnTemplate->printf ( "%d", operand->constDisplacement ); | |
2063 if ( operand->symbolDisplacement.dim ) | 2062 if ( operand->symbolDisplacement.dim ) |
2063 { | |
2064 insnTemplate->printf ( "%d", operand->constDisplacement ); | |
2064 insnTemplate->writebyte ( '+' ); | 2065 insnTemplate->writebyte ( '+' ); |
2066 } | |
2065 //addOperand(fmt, Arg_Integer, newIntExp(operand->constDisplacement), asmcode); | 2067 //addOperand(fmt, Arg_Integer, newIntExp(operand->constDisplacement), asmcode); |
2066 if ( opInfo->operands[i] & Opr_Dest ) | 2068 if ( opInfo->operands[i] & Opr_Dest ) |
2067 asmcode->clobbersMemory = 1; | 2069 asmcode->clobbersMemory = 1; |
2068 } | 2070 } |
2069 | 2071 |
2184 } | 2186 } |
2185 } | 2187 } |
2186 } | 2188 } |
2187 if ( use_star ) | 2189 if ( use_star ) |
2188 insnTemplate->writebyte ( '*' ); | 2190 insnTemplate->writebyte ( '*' ); |
2191 if ( operand->segmentPrefix != Reg_Invalid || !(operand->constDisplacement) ) | |
2192 { | |
2193 insnTemplate->printf ( "%d", operand->constDisplacement ); | |
2194 if ( opInfo->operands[i] & Opr_Dest ) | |
2195 asmcode->clobbersMemory = 1; | |
2196 } | |
2189 if ( operand->baseReg != Reg_Invalid || operand->indexReg != Reg_Invalid ) | 2197 if ( operand->baseReg != Reg_Invalid || operand->indexReg != Reg_Invalid ) |
2190 { | 2198 { |
2191 insnTemplate->writebyte ( '(' ); | 2199 insnTemplate->writebyte ( '(' ); |
2192 if ( operand->baseReg != Reg_Invalid ) | 2200 if ( operand->baseReg != Reg_Invalid ) |
2193 writeReg ( operand->baseReg ); | 2201 writeReg ( operand->baseReg ); |