Mercurial > projects > ldc
comparison gen/toir.cpp @ 1036:01544da4cdd8
Added ~{memory} clobber when a jump_target is generated in inline asm (branch out of inline asm)
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Mar 2009 19:18:47 +0100 |
parents | e594385d7e53 |
children | b30fe7e1dbb9 |
comparison
equal
deleted
inserted
replaced
1035:4c524d80e6e1 | 1036:01544da4cdd8 |
---|---|
2591 | 2591 |
2592 #if DMDV2 | 2592 #if DMDV2 |
2593 STUB(SymbolExp); | 2593 STUB(SymbolExp); |
2594 #endif | 2594 #endif |
2595 | 2595 |
2596 #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) {error("non-const expression '%s' or const Exp type "#x" not implemented", toChars()); fatal(); return NULL; } | 2596 #define CONSTSTUB(x) LLConstant* x::toConstElem(IRState * p) { \ |
2597 error("expression '%s' is not a constant", toChars()); \ | |
2598 fatal(); \ | |
2599 return NULL; \ | |
2600 } | |
2597 CONSTSTUB(Expression); | 2601 CONSTSTUB(Expression); |
2598 CONSTSTUB(GEPExp); | 2602 CONSTSTUB(GEPExp); |
2599 CONSTSTUB(SliceExp); | 2603 CONSTSTUB(SliceExp); |
2600 CONSTSTUB(IndexExp); | 2604 CONSTSTUB(IndexExp); |
2601 CONSTSTUB(AssocArrayLiteralExp); | 2605 CONSTSTUB(AssocArrayLiteralExp); |
2759 return 0; | 2763 return 0; |
2760 } | 2764 } |
2761 | 2765 |
2762 void obj_includelib(const char* lib) | 2766 void obj_includelib(const char* lib) |
2763 { | 2767 { |
2764 char *arg = (char *)mem.malloc(64); | 2768 size_t n = strlen(lib)+3; |
2769 char *arg = (char *)mem.malloc(n); | |
2765 strcpy(arg, "-l"); | 2770 strcpy(arg, "-l"); |
2766 strncat(arg, lib, 64); | 2771 strncat(arg, lib, n); |
2767 global.params.linkswitches->push(arg); | 2772 global.params.linkswitches->push(arg); |
2768 } | 2773 } |
2769 | 2774 |
2770 void backend_init() | 2775 void backend_init() |
2771 { | 2776 { |