about summary refs log tree commit diff
path: root/src/test/run-pass/thinlto
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-07 17:09:24 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-07 17:14:10 +0200
commit8760a5e3cc8bab89053ef9cee9757160e76f517d (patch)
treea26e08951bbcd997d1d34b2555b90265c81200dd /src/test/run-pass/thinlto
parent2819eca69cc053afaf975f4702abbde83c6b7cdc (diff)
downloadrust-8760a5e3cc8bab89053ef9cee9757160e76f517d.tar.gz
rust-8760a5e3cc8bab89053ef9cee9757160e76f517d.zip
Follow target ABI sign-/zero-extension rules for enum types
While attempting to port Rust to s390x, I ran into an ABI violation
(that caused rust_eh_personality to be miscompiled, breaking unwinding).
The problem is that this function returns an enum type, which is
supposed to be sign-extended according to the s390x ABI.  However,
common code would ignore target sign-/zero-extension rules for any
types that do not satisfy is_integral(), which includes enums.

For the general case of Rust enum types, which map to structure types
with a discriminant, that seems correct.  However, in the special case
of simple enums that map directly to C enum types (i.e. LLVM integers),
this is incorrect; we must follow the target extension rules for those.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Diffstat (limited to 'src/test/run-pass/thinlto')
0 files changed, 0 insertions, 0 deletions