summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/abi/call/sparc64.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:25 +0000
commit5363f350887b1e5b5dd21a86f88c8af9d7fea6da (patch)
tree35ca005eb6e0e9a1ba3bb5dbc033209ad445dc17 /compiler/rustc_target/src/abi/call/sparc64.rs
parentAdding debian version 1.66.0+dfsg1-1. (diff)
downloadrustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.tar.xz
rustc-5363f350887b1e5b5dd21a86f88c8af9d7fea6da.zip
Merging upstream version 1.67.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_target/src/abi/call/sparc64.rs')
-rw-r--r--compiler/rustc_target/src/abi/call/sparc64.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_target/src/abi/call/sparc64.rs b/compiler/rustc_target/src/abi/call/sparc64.rs
index 1b74959ad..c8b6ac5ae 100644
--- a/compiler/rustc_target/src/abi/call/sparc64.rs
+++ b/compiler/rustc_target/src/abi/call/sparc64.rs
@@ -78,7 +78,7 @@ fn arg_scalar_pair<C>(
where
C: HasDataLayout,
{
- data = arg_scalar(cx, &scalar1, offset, data);
+ data = arg_scalar(cx, scalar1, offset, data);
match (scalar1.primitive(), scalar2.primitive()) {
(abi::F32, _) => offset += Reg::f32().size,
(_, abi::F64) => offset += Reg::f64().size,
@@ -87,10 +87,10 @@ where
_ => {}
}
- if (offset.raw % 4) != 0 && scalar2.primitive().is_float() {
- offset.raw += 4 - (offset.raw % 4);
+ if (offset.bytes() % 4) != 0 && scalar2.primitive().is_float() {
+ offset += Size::from_bytes(4 - (offset.bytes() % 4));
}
- data = arg_scalar(cx, &scalar2, offset, data);
+ data = arg_scalar(cx, scalar2, offset, data);
return data;
}
@@ -169,14 +169,14 @@ where
has_float: false,
arg_attribute: ArgAttribute::default(),
},
- Size { raw: 0 },
+ Size::ZERO,
);
if data.has_float {
// Structure { float, int, int } doesn't like to be handled like
// { float, long int }. Other way around it doesn't mind.
if data.last_offset < arg.layout.size
- && (data.last_offset.raw % 8) != 0
+ && (data.last_offset.bytes() % 8) != 0
&& data.prefix_index < data.prefix.len()
{
data.prefix[data.prefix_index] = Some(Reg::i32());
@@ -185,7 +185,7 @@ where
}
let mut rest_size = arg.layout.size - data.last_offset;
- if (rest_size.raw % 8) != 0 && data.prefix_index < data.prefix.len() {
+ if (rest_size.bytes() % 8) != 0 && data.prefix_index < data.prefix.len() {
data.prefix[data.prefix_index] = Some(Reg::i32());
rest_size = rest_size - Reg::i32().size;
}
@@ -214,13 +214,13 @@ where
C: HasDataLayout,
{
if !fn_abi.ret.is_ignore() {
- classify_arg(cx, &mut fn_abi.ret, Size { raw: 32 });
+ classify_arg(cx, &mut fn_abi.ret, Size::from_bytes(32));
}
for arg in fn_abi.args.iter_mut() {
if arg.is_ignore() {
continue;
}
- classify_arg(cx, arg, Size { raw: 16 });
+ classify_arg(cx, arg, Size::from_bytes(16));
}
}