mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-07 04:46:52 +00:00
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
62aa905595
commit
10794272f1
File diff suppressed because it is too large
Load Diff
@ -1713,22 +1713,17 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
|
|||||||
GEN_ERROR("Constant value doesn't fit in type");
|
GEN_ERROR("Constant value doesn't fit in type");
|
||||||
APInt Val(64, $2);
|
APInt Val(64, $2);
|
||||||
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
||||||
if (BitWidth > 64)
|
Val.sextOrTrunc(BitWidth);
|
||||||
Val.sext(BitWidth);
|
$$ = ConstantInt::get(Val);
|
||||||
else if (BitWidth < 64)
|
|
||||||
Val.trunc(BitWidth);
|
|
||||||
$$ = ConstantInt::get($1, Val);
|
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
}
|
}
|
||||||
| IntType ESAPINTVAL { // arbitrary precision integer constants
|
| IntType ESAPINTVAL { // arbitrary precision integer constants
|
||||||
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
||||||
if ($2->getBitWidth() > BitWidth) {
|
if ($2->getBitWidth() > BitWidth) {
|
||||||
GEN_ERROR("Constant value does not fit in type");
|
GEN_ERROR("Constant value does not fit in type");
|
||||||
} else if ($2->getBitWidth() < BitWidth)
|
}
|
||||||
$2->sext(BitWidth);
|
$2->sextOrTrunc(BitWidth);
|
||||||
else if ($2->getBitWidth() > BitWidth)
|
$$ = ConstantInt::get(*$2);
|
||||||
$2->trunc(BitWidth);
|
|
||||||
$$ = ConstantInt::get($1, *$2);
|
|
||||||
delete $2;
|
delete $2;
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
}
|
}
|
||||||
@ -1737,18 +1732,16 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
|
|||||||
GEN_ERROR("Constant value doesn't fit in type");
|
GEN_ERROR("Constant value doesn't fit in type");
|
||||||
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
||||||
APInt Val(BitWidth, $2);
|
APInt Val(BitWidth, $2);
|
||||||
$$ = ConstantInt::get($1, Val);
|
$$ = ConstantInt::get(Val);
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
}
|
}
|
||||||
| IntType EUAPINTVAL { // arbitrary precision integer constants
|
| IntType EUAPINTVAL { // arbitrary precision integer constants
|
||||||
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
uint32_t BitWidth = cast<IntegerType>($1)->getBitWidth();
|
||||||
if ($2->getBitWidth() > BitWidth) {
|
if ($2->getBitWidth() > BitWidth) {
|
||||||
GEN_ERROR("Constant value does not fit in type");
|
GEN_ERROR("Constant value does not fit in type");
|
||||||
} else if ($2->getBitWidth() < BitWidth)
|
}
|
||||||
$2->zext(BitWidth);
|
$2->zextOrTrunc(BitWidth);
|
||||||
else if ($2->getBitWidth() > BitWidth)
|
$$ = ConstantInt::get(*$2);
|
||||||
$2->trunc(BitWidth);
|
|
||||||
$$ = ConstantInt::get($1, *$2);
|
|
||||||
delete $2;
|
delete $2;
|
||||||
CHECK_FOR_ERROR
|
CHECK_FOR_ERROR
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user