[AVR] Update the compiletest library to recognize AVR as a 16-bit target
This commit is contained in:
parent
e369cf6b27
commit
b4a041c050
2 changed files with 8 additions and 0 deletions
|
|
@ -27,6 +27,12 @@ fn test_parse_normalization_string() {
|
|||
let first = parse_normalization_string(&mut s);
|
||||
assert_eq!(first, Some("something (32 bits)".to_owned()));
|
||||
assert_eq!(s, " -> \"something ($WORD bits).");
|
||||
|
||||
// Nothing to normalize (No quotes, 16-bit)
|
||||
let mut s = "normalize-stderr-16bit: something (16 bits) -> something ($WORD bits).";
|
||||
let first = parse_normalization_string(&mut s);
|
||||
assert_eq!(first, None);
|
||||
assert_eq!(s, r#"normalize-stderr-16bit: something (16 bits) -> something ($WORD bits)."#);
|
||||
}
|
||||
|
||||
fn config() -> Config {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,8 @@ pub fn matches_env(triple: &str, name: &str) -> bool {
|
|||
pub fn get_pointer_width(triple: &str) -> &'static str {
|
||||
if (triple.contains("64") && !triple.ends_with("gnux32")) || triple.starts_with("s390x") {
|
||||
"64bit"
|
||||
} else if triple.starts_with("avr") {
|
||||
"16bit"
|
||||
} else {
|
||||
"32bit"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue