Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I586 fixes #64

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libcextract/ArgvParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ void ArgvParser::Insert_Required_Parameters(void)
std::vector<const char *> priv_args = {
"-Xclang", "-detailed-preprocessing-record",
// For some reason libtooling do not pass the clang include folder. Pass this then.
#ifdef __i386__
"-I/usr/lib/clang/" STRINGFY_VALUE(CLANG_VERSION_MAJOR) "/include",
#else
"-I/usr/lib64/clang/" STRINGFY_VALUE(CLANG_VERSION_MAJOR) "/include",
#endif
"-Wno-gnu-variable-sized-type-not-at-end",
"-Wno-incompatible-pointer-types-discards-qualifiers", // this can be triggered for older codestreams
"-Wno-missing-prototypes", // We remove the static keyword from the
Expand Down
2 changes: 2 additions & 0 deletions testsuite/small/attr-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* { dg-skip-on-archs "s390x" }*/
#ifdef __x86_64__
register unsigned long current_stack_pointer asm("rsp");
#elif __i386__
register unsigned long current_stack_pointer asm("esp");
#elif __aarch64__
register unsigned long current_stack_pointer asm("sp");
#elif __PPC64__
Expand Down
4 changes: 3 additions & 1 deletion testsuite/small/attr-6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* { dg-skip-on-archs "s390x" }*/
#ifdef __x86_64__
#define REG "rsp"
#elif __i386__
#define REG "esp"
#elif __aarch64__
#define REG "sp"
#elif __PPC64__
Expand All @@ -15,6 +17,6 @@ unsigned long f()
return current_stack_pointer;
}

/* { dg-final { scan-tree-dump "#define REG \"(rsp|sp|r1)\"" } } */
/* { dg-final { scan-tree-dump "#define REG \"(rsp|esp|sp|r1)\"" } } */
/* { dg-final { scan-tree-dump "current_stack_pointer asm\(REG\)" } } */
/* { dg-final { scan-tree-dump "unsigned long f" } } */
Loading