Skip to content

Commit 1e380cb

Browse files
committed
[MSP430] Don't enable trap_unreachable option by default on msp.
Since MSP430 doesn't meaningfully support faulting on illegal instructions, LLVM generates a call to abort() function instead of a trap instruction. Such calls are 4 bytes long, and that is too much overhead for such small target.
1 parent def3269 commit 1e380cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/librustc_back/target/msp430_none_elf.rs

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ pub fn target() -> TargetResult {
5353
// don't want to invoke that many gcc instances.
5454
default_codegen_units: Some(1),
5555

56+
// Since MSP430 doesn't meaningfully support faulting on illegal
57+
// instructions, LLVM generates a call to abort() function instead
58+
// of a trap instruction. Such calls are 4 bytes long, and that is
59+
// too much overhead for such small target.
60+
trap_unreachable: false,
61+
5662
.. Default::default( )
5763
}
5864
})

0 commit comments

Comments
 (0)