From 8448570beb954b76f15b18455fec3156e1143a68 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. llvm-svn: 36349 --- llvm/lib/AsmParser/llvmAsmParser.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/AsmParser/llvmAsmParser.y') diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y index 9b5cc5abfd5..2b08d3afa1b 100644 --- a/llvm/lib/AsmParser/llvmAsmParser.y +++ b/llvm/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.2.3