Skip to content

Commit c0e0b93

Browse files
committed
Fix MSP430 default calling convention.
...which, as far as I can tell, has been completely backwards since this code was shipped.
1 parent 2aba9ea commit c0e0b93

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

arch/msp430/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ pub extern "C" fn CorePluginInit() -> bool {
3030
// standardized one that is compatible with TI's compiler
3131
let default = calling_convention::ConventionBuilder::new(arch)
3232
.is_eligible_for_heuristics(true)
33-
.int_arg_registers(&["r15", "r14", "r13", "r12"])
34-
.return_int_reg("r15")
35-
.return_hi_int_reg("r14")
33+
.int_arg_registers(&["r12", "r13", "r14", "r15"])
34+
.return_int_reg("r12")
35+
.return_hi_int_reg("r13")
3636
.register("default");
3737
calling_convention::ConventionBuilder::new(arch)
3838
.is_eligible_for_heuristics(true)
39-
.return_int_reg("r15")
40-
.return_hi_int_reg("r14")
39+
.return_int_reg("r12")
40+
.return_hi_int_reg("r13")
4141
.register("stack");
4242

4343
arch.set_default_calling_convention(&default);

0 commit comments

Comments
 (0)