Mercurial > projects > ldc
comparison gen/d-asm-i386.h @ 221:68687d8c3e9a trunk
[svn r237] some inline asm output now seems to work, see tangotests/asm2.d
author | lindquist |
---|---|
date | Fri, 06 Jun 2008 20:51:43 +0200 |
parents | ccc2e6898a78 |
children | 251548c1035d |
comparison
equal
deleted
inserted
replaced
220:ccc2e6898a78 | 221:68687d8c3e9a |
---|---|
1853 if (operand->indexReg == Reg_Invalid && | 1853 if (operand->indexReg == Reg_Invalid && |
1854 decl->isVarDeclaration() && | 1854 decl->isVarDeclaration() && |
1855 ((operand->baseReg == Reg_EBP && ! sc->func->naked ) || | 1855 ((operand->baseReg == Reg_EBP && ! sc->func->naked ) || |
1856 (operand->baseReg == Reg_ESP && sc->func->naked)) ) { | 1856 (operand->baseReg == Reg_ESP && sc->func->naked)) ) { |
1857 | 1857 |
1858 e = new AddrExp(0, e); | 1858 if (mode == Mode_Output) |
1859 e->type = decl->type->pointerTo(); | 1859 { |
1860 e = new AddrExp(0, e); | |
1861 e->type = decl->type->pointerTo(); | |
1862 } | |
1863 | |
1860 #if !IN_LLVM | 1864 #if !IN_LLVM |
1861 /* DMD uses the same frame offsets for naked functions. */ | 1865 /* DMD uses the same frame offsets for naked functions. */ |
1862 if (sc->func->naked) | 1866 if (sc->func->naked) |
1863 operand->constDisplacement += 4; | 1867 operand->constDisplacement += 4; |
1864 | 1868 |
1907 } else { | 1911 } else { |
1908 if (use_star) { | 1912 if (use_star) { |
1909 insnTemplate->writebyte('*'); | 1913 insnTemplate->writebyte('*'); |
1910 use_star = false; | 1914 use_star = false; |
1911 } | 1915 } |
1916 if (mode == Mode_Output) | |
1917 { | |
1918 e = new AddrExp(0, e); | |
1919 assert(decl); | |
1920 e->type = decl->type->pointerTo(); | |
1921 } | |
1912 addOperand(fmt, Arg_Memory, e, asmcode, mode); | 1922 addOperand(fmt, Arg_Memory, e, asmcode, mode); |
1913 } | 1923 } |
1914 } | 1924 } |
1915 } | 1925 } |
1916 if (use_star) | 1926 if (use_star) |