diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-04-22 19:24:39 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-04-22 19:24:39 +0000 |
commit | 43c7f37942a35398fd1e14b22f435f483a0ee863 (patch) | |
tree | 7b5086671d5743f3187e8f8f3bc6d7fe1e507b39 /lib/AsmParser | |
parent | cb403d69fb620d4df66233d27a6f8c545ce0d0e4 (diff) | |
download | external_llvm-43c7f37942a35398fd1e14b22f435f483a0ee863.zip external_llvm-43c7f37942a35398fd1e14b22f435f483a0ee863.tar.gz external_llvm-43c7f37942a35398fd1e14b22f435f483a0ee863.tar.bz2 |
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
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 8 |
1 files changed, 4 insertions, 4 deletions
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<PointerType>($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<PointerType>($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 { |