Commit 6f00949
committed
Fix u128 rotate operation on 32 bit targets
This tweaks how we handle the right hand side of rotate intrinsics and
tweaks how we handle integers so that we can fall back on _BitInt(128)
on some targets.
gcc/rust/ChangeLog:
* backend/rust-compile-intrinsic.cc: Include "convert.h".
(rotate_handler): Convert the second parameter into an unsigned
int.
* rust-backend.h (RUST_INT_TREE_U8): Define macro.
(RUST_INT_TREE_U16): Likewise.
(RUST_INT_TREE_U32): Likewise.
(RUST_INT_TREE_U64): Likewise.
(RUST_INT_TREE_U128): Likewise.
(RUST_INT_TREE_I8): Likewise.
(RUST_INT_TREE_I16): Likewise.
(RUST_INT_TREE_I32): Likewise.
(RUST_INT_TREE_I64): Likewise.
(RUST_INT_TREE_I128): Likewise.
(rust_int_trees): Declare extern variable.
(rust_int_names): Likewise.
* rust-gcc.cc: Include "target.h".
(rust_int_trees): Define variable.
(rust_int_names): Likewise.
(setup_normal_integers): Define static function to set up
rust_int_trees.
(init): Call setup_normal_integers.
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Use
rust_int_trees via macros to obtain integer type trees.
* config-lang.in (gtfiles): Add "rust-backend.h".
gcc/testsuite/ChangeLog:
* rust/execute/torture/sip-hasher.rs: Enable on 32 bit targets.
Signed-off-by: Owen Avery <[email protected]>1 parent 3a57c56 commit 6f00949
File tree
6 files changed
+132
-27
lines changed- gcc
- rust
- backend
- testsuite/rust/execute/torture
6 files changed
+132
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
560 | 569 | | |
561 | | - | |
| 570 | + | |
562 | 571 | | |
563 | 572 | | |
564 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
508 | | - | |
| 507 | + | |
509 | 508 | | |
510 | 509 | | |
511 | 510 | | |
512 | | - | |
513 | | - | |
514 | | - | |
| 511 | + | |
515 | 512 | | |
516 | 513 | | |
517 | 514 | | |
518 | | - | |
519 | | - | |
520 | | - | |
| 515 | + | |
521 | 516 | | |
522 | 517 | | |
523 | 518 | | |
524 | | - | |
525 | | - | |
526 | | - | |
| 519 | + | |
527 | 520 | | |
528 | 521 | | |
529 | 522 | | |
530 | | - | |
531 | | - | |
532 | | - | |
| 523 | + | |
533 | 524 | | |
534 | 525 | | |
535 | 526 | | |
| |||
540 | 531 | | |
541 | 532 | | |
542 | 533 | | |
543 | | - | |
544 | | - | |
| 534 | + | |
545 | 535 | | |
546 | 536 | | |
547 | 537 | | |
548 | | - | |
549 | | - | |
| 538 | + | |
550 | 539 | | |
551 | 540 | | |
552 | 541 | | |
553 | | - | |
554 | | - | |
| 542 | + | |
555 | 543 | | |
556 | 544 | | |
557 | 545 | | |
558 | | - | |
559 | | - | |
| 546 | + | |
560 | 547 | | |
561 | 548 | | |
562 | 549 | | |
563 | | - | |
564 | | - | |
565 | | - | |
| 550 | + | |
566 | 551 | | |
567 | 552 | | |
568 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
| |||
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
98 | 190 | | |
99 | 191 | | |
100 | 192 | | |
| 193 | + | |
| 194 | + | |
101 | 195 | | |
102 | 196 | | |
103 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
0 commit comments