mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
rustc: Use 16bit c_int for msp430
Fix regression from c2fe69b9
, where main() signature was changed from
using 16bit isize to 32bit c_int for argc parameter/result.
This commit is contained in:
parent
a204c193ca
commit
12a8bc6eb9
@ -16,7 +16,7 @@ pub fn target() -> TargetResult {
|
||||
llvm_target: "msp430-none-elf".to_string(),
|
||||
target_endian: "little".to_string(),
|
||||
target_pointer_width: "16".to_string(),
|
||||
target_c_int_width: "32".to_string(),
|
||||
target_c_int_width: "16".to_string(),
|
||||
data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(),
|
||||
arch: "msp430".to_string(),
|
||||
target_os: "none".to_string(),
|
||||
|
32
src/test/codegen/abi-main-signature-16bit-c-int.rs
Normal file
32
src/test/codegen/abi-main-signature-16bit-c-int.rs
Normal file
@ -0,0 +1,32 @@
|
||||
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// Checks the signature of the implicitly generated native main()
|
||||
// entry point. It must match C's `int main(int, char **)`.
|
||||
|
||||
// This test is for targets with 16bit c_int only.
|
||||
// ignore-aarch64
|
||||
// ignore-arm
|
||||
// ignore-asmjs
|
||||
// ignore-hexagon
|
||||
// ignore-mips
|
||||
// ignore-powerpc
|
||||
// ignore-powerpc64
|
||||
// ignore-s390x
|
||||
// ignore-sparc
|
||||
// ignore-wasm32
|
||||
// ignore-x86
|
||||
// ignore-x86_64
|
||||
// ignore-xcore
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
||||
// CHECK: define i16 @main(i16, i8**)
|
@ -11,6 +11,9 @@
|
||||
// Checks the signature of the implicitly generated native main()
|
||||
// entry point. It must match C's `int main(int, char **)`.
|
||||
|
||||
// This test is for targets with 32bit c_int only.
|
||||
// ignore-msp430
|
||||
|
||||
fn main() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user