comparison gen/d-asm-i386.h @ 234:9760f54af0b7 trunk

[svn r250] Fixed the warning about dropping arguments to _Dmain when optimizing. Did a few cleanups in inline asm code.
author lindquist
date Sun, 08 Jun 2008 08:03:19 +0200
parents 092468448d25
children fa691b1c0498
comparison
equal deleted inserted replaced
233:76ee1bbe487e 234:9760f54af0b7
1406 return false; 1406 return false;
1407 } 1407 }
1408 1408
1409 void addOperand(const char * fmt, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input) { 1409 void addOperand(const char * fmt, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input) {
1410 insnTemplate->writestring((char*) fmt); 1410 insnTemplate->writestring((char*) fmt);
1411 insnTemplate->printf("<<<%s%d>>>", (mode==Mode_Input)?"in":"out", asmcode->args.dim); 1411 insnTemplate->printf("<<%s%d>>", (mode==Mode_Input)?"in":"out", asmcode->args.dim);
1412 asmcode->args.push( new AsmArg(type, e, mode) ); 1412 asmcode->args.push( new AsmArg(type, e, mode) );
1413 } 1413 }
1414 void addOperand2(const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input) { 1414 void addOperand2(const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input) {
1415 insnTemplate->writestring((char*) fmtpre); 1415 insnTemplate->writestring((char*) fmtpre);
1416 insnTemplate->printf("<<<%s%d>>>", (mode==Mode_Input)?"in":"out", asmcode->args.dim); 1416 insnTemplate->printf("<<%s%d>>", (mode==Mode_Input)?"in":"out", asmcode->args.dim);
1417 insnTemplate->writestring((char*) fmtpost); 1417 insnTemplate->writestring((char*) fmtpost);
1418 asmcode->args.push( new AsmArg(type, e, mode) ); 1418 asmcode->args.push( new AsmArg(type, e, mode) );
1419 } 1419 }
1420 1420
1421 void addLabel(unsigned n) { 1421 void addLabel(unsigned n) {
1425 d_format_priv_asm_label(buf, n); 1425 d_format_priv_asm_label(buf, n);
1426 insnTemplate->writestring(buf); 1426 insnTemplate->writestring(buf);
1427 } 1427 }
1428 1428
1429 void addLabel(char* id) { 1429 void addLabel(char* id) {
1430 insnTemplate->writestring(".LDASM"); 1430 insnTemplate->writestring(".LDASM_");
1431 insnTemplate->writestring(id); 1431 insnTemplate->writestring(id);
1432 } 1432 }
1433 1433
1434 /* Determines whether the operand is a register, memory reference 1434 /* Determines whether the operand is a register, memory reference
1435 or immediate. Immediate addresses are currently classified as 1435 or immediate. Immediate addresses are currently classified as