Skip to content

Commit 731f928

Browse files
committed
---
yaml --- r: 173935 b: refs/heads/auto c: 7d4f358 h: refs/heads/master i: 173933: 8e3c33c 173931: 9560fd1 173927: a6845cc 173919: 5144859 v: v3
1 parent ab4b350 commit 731f928

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 5edbe1f5ddab26a5a8ea75d447d5a37d8f7a3347
13+
refs/heads/auto: 7d4f358de7de97b443a97e1f18a16781d472bbda
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_trans/trans/cabi_x86_64.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ enum RegClass {
3232
SSEFv,
3333
SSEDs,
3434
SSEDv,
35-
SSEInt,
35+
SSEInt(/* bitwidth */ u64),
3636
/// Data that can appear in the upper half of an SSE register.
3737
SSEUp,
3838
X87,
@@ -57,7 +57,7 @@ impl TypeMethods for Type {
5757
impl RegClass {
5858
fn is_sse(&self) -> bool {
5959
match *self {
60-
SSEFs | SSEFv | SSEDs | SSEDv => true,
60+
SSEFs | SSEFv | SSEDs | SSEDv | SSEInt(_) => true,
6161
_ => false
6262
}
6363
}
@@ -254,7 +254,7 @@ fn classify_ty(ty: Type) -> Vec<RegClass> {
254254
let elt = ty.element_type();
255255
let eltsz = ty_size(elt);
256256
let mut reg = match elt.kind() {
257-
Integer => SSEInt,
257+
Integer => SSEInt(elt.int_width()),
258258
Float => SSEFv,
259259
Double => SSEDv,
260260
_ => panic!("classify: unhandled vector element type")
@@ -350,19 +350,19 @@ fn llreg_ty(ccx: &CrateContext, cls: &[RegClass]) -> Type {
350350
Int => {
351351
tys.push(Type::i64(ccx));
352352
}
353-
SSEFv | SSEDv | SSEInt => {
353+
SSEFv | SSEDv | SSEInt(_) => {
354354
let (elts_per_word, elt_ty) = match cls[i] {
355355
SSEFv => (2, Type::f32(ccx)),
356356
SSEDv => (1, Type::f64(ccx)),
357-
// FIXME: need to handle the element types, since
358-
// C doesn't distinguish between the contained
359-
// types of the vector at all; normalise to u8,
360-
// maybe?
361-
SSEInt => panic!("llregtype: SSEInt not yet supported"),
357+
SSEInt(bits) => {
358+
assert!(bits == 8 || bits == 16 || bits == 32 || bits == 64,
359+
"llreg_ty: unsupported SSEInt width {}", bits);
360+
(64 / bits, Type::ix(ccx, bits))
361+
}
362362
_ => unreachable!(),
363363
};
364364
let vec_len = llvec_len(&cls[(i + 1u)..]);
365-
let vec_ty = Type::vector(&elt_ty, (vec_len * elts_per_word) as u64);
365+
let vec_ty = Type::vector(&elt_ty, vec_len as u64 * elts_per_word);
366366
tys.push(vec_ty);
367367
i += vec_len;
368368
continue;

0 commit comments

Comments
 (0)