-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86] Add ABI handling for __float128 to match with GCC (#75156)
Fixes #74601
- Loading branch information
1 parent
06f1e10
commit f07aba4
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature +sse2 < %s | FileCheck %s --check-prefixes=CHECK | ||
// RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -target-feature -sse2 < %s | FileCheck %s --check-prefixes=CHECK | ||
|
||
struct st1 { | ||
__float128 a; | ||
}; | ||
|
||
struct st1 h1(__float128 a) { | ||
// CHECK: define{{.*}}fp128 @h1(fp128 | ||
struct st1 x; | ||
x.a = a; | ||
return x; | ||
} | ||
|
||
__float128 h2(struct st1 x) { | ||
// CHECK: define{{.*}}fp128 @h2(fp128 | ||
return x.a; | ||
} | ||
|
||
struct st2 { | ||
__float128 a; | ||
int b; | ||
}; | ||
|
||
struct st2 h3(__float128 a, int b) { | ||
// CHECK: define{{.*}}void @h3(ptr {{.*}}sret(%struct.st2) | ||
struct st2 x; | ||
x.a = a; | ||
x.b = b; | ||
return x; | ||
} | ||
|
||
__float128 h4(struct st2 x) { | ||
// CHECK: define{{.*}}fp128 @h4(ptr {{.*}}byval(%struct.st2) | ||
return x.a; | ||
} |