forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request diffblue#2296 from smowton/smowton/fix/restore-flo…
…at128 Restore _Float128 support by default
- Loading branch information
Showing
15 changed files
with
70 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
|
||
gcc -Wno-macro-redefined -U __clang_major__ -D __GNUC__=4 -D __GNUC_MINOR__=9 -D __GNUC_PATCHLEVEL__=1 $* | ||
gcc -Wno-macro-redefined -U __clang_major__ -D __GNUC__=4 -D __GNUC_MINOR__=2 -D __GNUC_PATCHLEVEL__=1 "$@" | ||
|
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,3 @@ | ||
#!/bin/sh | ||
|
||
gcc -Wno-macro-redefined -U __clang_major__ -D __GNUC__=5 -D __GNUC_MINOR__=0 -D __GNUC_PATCHLEVEL__=0 "$@" |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
|
||
gcc -Wno-macro-redefined -U __clang_major__ -D __GNUC__=7 -D __GNUC_MINOR__=0 -D __GNUC_PATCHLEVEL__=0 $* | ||
gcc -Wno-macro-redefined -U __clang_major__ -D __GNUC__=7 -D __GNUC_MINOR__=0 -D __GNUC_PATCHLEVEL__=0 "$@" | ||
|
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
typedef double _Float64; | ||
// None of these types should be defined when emulating gcc-4: | ||
|
||
typedef float _Float32; | ||
typedef double _Float32x; | ||
typedef double _Float64; | ||
typedef long double _Float64x; | ||
typedef long double _Float128; | ||
typedef long double _Float128x; |
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,9 @@ | ||
// These types should *not* be provided when emulating gcc-5: | ||
typedef float _Float32; | ||
typedef double _Float32x; | ||
typedef double _Float64; | ||
typedef long double _Float64x; | ||
typedef long double _Float128x; | ||
|
||
// But this type should: | ||
_Float128 f128; |
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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
_Float64 some_var; | ||
|
||
// All these types should be provided when emulating gcc-7: | ||
_Float32 f32; | ||
_Float32x f32x; | ||
_Float64 f64; | ||
_Float64x f64x; | ||
_Float128 f128; | ||
_Float128x f128x; |
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,7 @@ | ||
CORE | ||
gcc-5.c | ||
--native-compiler ./fake-gcc-5 | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
-- | ||
^CONVERSION ERROR$ |
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 |
---|---|---|
@@ -1,18 +1,32 @@ | ||
#if defined(__clang__) | ||
#elif defined(__GNUC__) | ||
#if defined(__GNUC__) && !defined(__clang__) | ||
|
||
#include <features.h> // For __GNUC_PREREQ | ||
|
||
#ifdef __x86_64__ | ||
#define FLOAT128_MINOR_VERSION 3 | ||
#else | ||
#define FLOAT128_MINOR_VERSION 5 | ||
#endif | ||
|
||
#if __GNUC__ >= 7 | ||
#define HAS_FLOATN | ||
#elif __GNUC_PREREQ(4, FLOAT128_MINOR_VERSION) | ||
#define HAS_FLOAT128 | ||
#endif | ||
|
||
#endif | ||
|
||
#ifndef HAS_FLOATN | ||
typedef float _Float32; | ||
typedef double _Float32x; | ||
typedef double _Float64; | ||
typedef long double _Float64x; | ||
typedef long double _Float128; | ||
typedef long double _Float128x; | ||
#endif | ||
|
||
#if !defined(HAS_FLOATN) && !defined(HAS_FLOAT128) | ||
typedef long double _Float128; | ||
#endif | ||
|
||
int main(int argc, char** argv) { | ||
} |
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
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
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