llvm_ir_generator: make sure RPC allocations are not underaligned.

This commit is contained in:
whitequark 2016-10-16 16:43:03 +00:00
parent 7618907cad
commit 2a9e370840

View File

@ -1289,6 +1289,7 @@ class LLVMIRGenerator:
self.llbuilder.position_at_end(llalloc) self.llbuilder.position_at_end(llalloc)
llalloca = self.llbuilder.alloca(lli8, llsize, name="rpc.alloc") llalloca = self.llbuilder.alloca(lli8, llsize, name="rpc.alloc")
llalloca.align = 4 # maximum alignment required by OR1K ABI
llphi.add_incoming(llalloca, llalloc) llphi.add_incoming(llalloca, llalloc)
self.llbuilder.branch(llhead) self.llbuilder.branch(llhead)