mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-03 17:39:48 +00:00
Work around a GCC bug, producing this code:
unsigned char *llvm_cbe_X; ... llvm_cbe_X = 0; *((void**)&llvm_cbe_X) = __builtin_stack_save(); instead of: llvm_cbe_X = __builtin_stack_save(); See PR1809 for details. llvm-svn: 44415
This commit is contained in:
parent
0c1478dac1
commit
906683b821
@ -2573,6 +2573,12 @@ void CWriter::visitCallInst(CallInst &I) {
|
||||
writeOperand(I.getOperand(3));
|
||||
Out << ")";
|
||||
return;
|
||||
case Intrinsic::stacksave:
|
||||
// Emit this as: Val = 0; *((void**)&Val) = __builtin_stack_save()
|
||||
// to work around GCC bugs (see PR1809).
|
||||
Out << "0; *((void**)&" << GetValueName(&I)
|
||||
<< ") = __builtin_stack_save()";
|
||||
return;
|
||||
case Intrinsic::dbg_stoppoint: {
|
||||
// If we use writeOperand directly we get a "u" suffix which is rejected
|
||||
// by gcc.
|
||||
|
Loading…
Reference in New Issue
Block a user