- 论坛徽章:
- 0
|
回复 42# zylthinking
1.不同的平台上constraint可能不同。特别是I J K ....这些是平台相关的constraint
i386上的定义:
- ;; Integer constant constraints.
- (define_constraint "I"
- "Integer constant in the range 0 @dots{} 31, for 32-bit shifts."
- (and (match_code "const_int")
- (match_test "IN_RANGE (ival, 0, 31)")))
- (define_constraint "J"
- "Integer constant in the range 0 @dots{} 63, for 64-bit shifts."
- (and (match_code "const_int")
- (match_test "IN_RANGE (ival, 0, 63)")))
- (define_constraint "K"
- "Signed 8-bit integer constant."
- (and (match_code "const_int")
- (match_test "IN_RANGE (ival, -128, 127)")))
- (define_constraint "L"
- "@code{0xFF} or @code{0xFFFF}, for andsi as a zero-extending move."
- (and (match_code "const_int")
- (match_test "ival == 0xFF || ival == 0xFFFF")))
复制代码 m68k上的定义:- (define_constraint "I"
- "Integer constant in the range 1 @dots 8, for immediate shift counts and addq."
- (and (match_code "const_int")
- (match_test "ival > 0 && ival <= 8")))
- (define_constraint "J"
- "Signed 16-bit integer constant."
- (and (match_code "const_int")
- (match_test "ival >= -0x8000 && ival <= 0x7fff")))
- (define_constraint "K"
- "Integer constant that moveq can't handle."
- (and (match_code "const_int")
- (match_test "ival < -0x80 || ival >= 0x80")))
- (define_constraint "L"
- "Integer constant in the range -8 @dots -1, for subq."
- (and (match_code "const_int")
- (match_test "ival < 0 && ival >= -8")))
复制代码 2. const vector就是一组const,gcc的内部表示。 |
|