Mercurial > projects > ldc
comparison gen/statements.cpp @ 219:761c8352f494 trunk
[svn r235] rough port of GDC's inline assembler code, unfinished
author | ChristianK |
---|---|
date | Thu, 05 Jun 2008 19:22:37 +0200 |
parents | 0806379a5eca |
children | 092468448d25 |
comparison
equal
deleted
inserted
replaced
218:df641a27e9fd | 219:761c8352f494 |
---|---|
1109 body->toIR(p); | 1109 body->toIR(p); |
1110 } | 1110 } |
1111 | 1111 |
1112 ////////////////////////////////////////////////////////////////////////////// | 1112 ////////////////////////////////////////////////////////////////////////////// |
1113 | 1113 |
1114 /* this has moved to asmstmt.cpp | |
1114 void AsmStatement::toIR(IRState* p) | 1115 void AsmStatement::toIR(IRState* p) |
1115 { | 1116 { |
1116 Logger::println("AsmStatement::toIR(): %s", loc.toChars()); | 1117 Logger::println("AsmStatement::toIR(): %s", loc.toChars()); |
1117 LOG_SCOPE; | 1118 LOG_SCOPE; |
1118 error("%s: inline asm is not yet implemented", loc.toChars()); | 1119 // error("%s: inline asm is not yet implemented", loc.toChars()); |
1119 fatal(); | 1120 // fatal(); |
1120 | 1121 |
1121 assert(!asmcode && !asmalign && !refparam && !naked && !regs); | 1122 assert(!asmcode && !asmalign && !refparam && !naked && !regs); |
1122 | 1123 |
1123 Token* t = tokens; | 1124 Token* t = tokens; |
1124 assert(t); | 1125 assert(t); |
1140 // create inline asm callee | 1141 // create inline asm callee |
1141 llvm::InlineAsm* inasm = llvm::InlineAsm::get(fty, asmstr, "r,r", false); | 1142 llvm::InlineAsm* inasm = llvm::InlineAsm::get(fty, asmstr, "r,r", false); |
1142 | 1143 |
1143 assert(0); | 1144 assert(0); |
1144 } | 1145 } |
1145 | 1146 */ |
1146 ////////////////////////////////////////////////////////////////////////////// | 1147 ////////////////////////////////////////////////////////////////////////////// |
1147 | 1148 |
1148 void VolatileStatement::toIR(IRState* p) | 1149 void VolatileStatement::toIR(IRState* p) |
1149 { | 1150 { |
1150 Logger::println("VolatileStatement::toIR(): %s", loc.toChars()); | 1151 Logger::println("VolatileStatement::toIR(): %s", loc.toChars()); |