From 43c7f37942a35398fd1e14b22f435f483a0ee863 Mon Sep 17 00:00:00 2001 From: Christopher Lamb Date: Sun, 22 Apr 2007 19:24:39 +0000 Subject: PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36349 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/AsmParser') diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 9b5cc5a..2b08d3a 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -2940,7 +2940,7 @@ MemoryInst : MALLOC Types OptCAlign { CHECK_FOR_ERROR } - | OptVolatile LOAD Types ValueRef { + | OptVolatile LOAD Types ValueRef OptCAlign { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription()); if (!isa($3->get())) @@ -2951,10 +2951,10 @@ MemoryInst : MALLOC Types OptCAlign { (*$3)->getDescription()); Value* tmpVal = getVal(*$3, $4); CHECK_FOR_ERROR - $$ = new LoadInst(tmpVal, "", $1); + $$ = new LoadInst(tmpVal, "", $1, $5); delete $3; } - | OptVolatile STORE ResolvedVal ',' Types ValueRef { + | OptVolatile STORE ResolvedVal ',' Types ValueRef OptCAlign { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$5)->getDescription()); const PointerType *PT = dyn_cast($5->get()); @@ -2968,7 +2968,7 @@ MemoryInst : MALLOC Types OptCAlign { Value* tmpVal = getVal(*$5, $6); CHECK_FOR_ERROR - $$ = new StoreInst($3, tmpVal, $1); + $$ = new StoreInst($3, tmpVal, $1, $7); delete $5; } | GETELEMENTPTR Types ValueRef IndexList { -- cgit v1.1