comparison gen/d-asm-i386.h @ 299:df8a7b8d5929 trunk

[svn r320] Begun work on branches out of asm blocks. Unfinished.
author ChristianK
date Tue, 24 Jun 2008 21:38:23 +0200
parents fa691b1c0498
children bef811104734
comparison
equal deleted inserted replaced
298:3b8ada4c9f8b 299:df8a7b8d5929
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
1909 unsigned lbl_num = ++d_priv_asm_label_serial; 1909 unsigned lbl_num = ++d_priv_asm_label_serial;
1910 addLabel(lbl_num); 1910 addLabel(lbl_num);
1911 asmcode->dollarLabel = lbl_num; // could make the dollar label part of the same asm.. 1911 asmcode->dollarLabel = lbl_num; // could make the dollar label part of the same asm..
1912 } else if (e->op == TOKdsymbol) { 1912 } else if (e->op == TOKdsymbol) {
1913 LabelDsymbol * lbl = (LabelDsymbol *) ((DsymbolExp *) e)->s; 1913 LabelDsymbol * lbl = (LabelDsymbol *) ((DsymbolExp *) e)->s;
1914 // this can probably be removed
1914 if (! lbl->asmLabelNum) 1915 if (! lbl->asmLabelNum)
1915 lbl->asmLabelNum = ++d_priv_asm_label_serial; 1916 lbl->asmLabelNum = ++d_priv_asm_label_serial;
1917
1918 stmt->isBranchToLabel = lbl->ident;
1916 1919
1917 use_star = false; 1920 use_star = false;
1918 addLabel(lbl->ident->toChars()); 1921 addLabel(lbl->ident->toChars());
1919 } else if ((decl && decl->isCodeseg())) { // if function or label 1922 } else if ((decl && decl->isCodeseg())) { // if function or label
1920 use_star = false; 1923 use_star = false;