Description[gcc] Replace rsp/rbp lea base with esp/ebp
This is yet another fix for POINTERS_EXTEND_UNSIGNED > 0 problem of keeping high part of rsp/rbp.
In addition, minor fix for previous change - do not assert if writing rsp/rbp into memory (probably spill)?
Test (-O1) must return 0 but returns high part of rsp without the fix:
struct StringRef {
const char *Data;
unsigned Length;
};
// Prevent inlining with 'weak' attribute
int print_size(struct StringRef Data) __attribute__((weak));
int print_size(struct StringRef Data) {
return Data.Length;
}
int main() {
char str[6]; // NEEDED!
struct StringRef s;
s.Data = str + 3; // NEEDED!
s.Length = 0;
return print_size(s);
}
BUG=http://code.google.com/p/nativeclient/issues/detail?id=1304
TEST=see above
Committed: http://git.chromium.org/gitweb/?p=nacl-toolchain.git;a=commit;h=cc3d67a
Patch Set 1 #
Messages
Total messages: 2 (0 generated)
|