diff gen/d-asm-i386.h @ 229:cac3d27ae481 trunk

[svn r245] initial support for labels in inline asm, broken :/
author lindquist
date Sat, 07 Jun 2008 21:31:38 +0200
parents 3092a38dddab
children 61aa721a6b7f
line wrap: on
line diff
--- a/gen/d-asm-i386.h	Sat Jun 07 19:20:15 2008 +0200
+++ b/gen/d-asm-i386.h	Sat Jun 07 21:31:38 2008 +0200
@@ -1413,11 +1413,11 @@
     }
 
     void addLabel(unsigned n) {
-	// No longer taking the address of the actual label -- doesn't seem like it would help.
-	char buf[64];
-	
-	d_format_priv_asm_label(buf, n);
-	insnTemplate->writestring(buf);
+    // No longer taking the address of the actual label -- doesn't seem like it would help.
+    char buf[64];
+    
+    d_format_priv_asm_label(buf, n);
+    insnTemplate->writestring(buf);
     }
 
     /* Determines whether the operand is a register, memory reference
@@ -1899,12 +1899,14 @@
 			    addLabel(lbl_num);
 			    asmcode->dollarLabel = lbl_num; // could make the dollar label part of the same asm..
 			} else if (e->op == TOKdsymbol) {
-			    LabelDsymbol * lbl = (LabelDsymbol *) ((DsymbolExp *) e)->s;
-			    if (! lbl->asmLabelNum)
-				lbl->asmLabelNum = ++d_priv_asm_label_serial;
-			    
-			    use_star = false;
-			    addLabel(lbl->asmLabelNum);
+// 			    LabelDsymbol * lbl = (LabelDsymbol *) ((DsymbolExp *) e)->s;
+// 			    if (! lbl->asmLabelNum)
+// 				lbl->asmLabelNum = ++d_priv_asm_label_serial;
+// 			    
+// 			    use_star = false;
+// 			    addLabel(lbl->asmLabelNum);
+                use_star = false;
+                addOperand("$", Arg_Pointer, e, asmcode);
 			} else if ((decl && decl->isCodeseg())) { // if function or label
 			    use_star = false;
 			    addOperand("*$", Arg_Pointer, e, asmcode);
@@ -2389,7 +2391,10 @@
 	case TOKfloat64v:
 	case TOKfloat80v:
 	    // %% need different types?
-	    e = new RealExp(stmt->loc, token->float80value, Type::tfloat80);
+        if (global.params.useFP80)
+	       e = new RealExp(stmt->loc, token->float80value, Type::tfloat80);
+        else
+            e = new RealExp(stmt->loc, token->float80value, Type::tfloat64);
 	    nextToken();
 	    break;
 	case TOKidentifier:
@@ -2630,7 +2635,7 @@
 
 // FIXME
     #define HOST_WIDE_INT long
-bool getFrameRelativeValue(DValue* decl, HOST_WIDE_INT * result)
+bool getFrameRelativeValue(LLValue* decl, HOST_WIDE_INT * result)
 {
 // FIXME
 //     // Using this instead of DECL_RTL for struct args seems like a