diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-17 18:51:36 +0000 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-17 18:51:36 +0000 |
| commit | 3f83552f2ca9b2f2ec311d91570146ca51f99809 (patch) | |
| tree | f0522041a32cfd1ac3cdda05157a3cc433fa406c | |
| parent | 69d8348e5e3da19e8f98c9ea063c45dc72ef7407 (diff) | |
| download | glibc-3f83552f2ca9b2f2ec311d91570146ca51f99809.tar.xz glibc-3f83552f2ca9b2f2ec311d91570146ca51f99809.zip | |
tile: support tilegx32 in stackguard-macros.h
| -rw-r--r-- | ChangeLog.tile | 2 | ||||
| -rw-r--r-- | sysdeps/tile/stackguard-macros.h | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog.tile b/ChangeLog.tile index 51acbc660b..52b38b4a7d 100644 --- a/ChangeLog.tile +++ b/ChangeLog.tile @@ -1,5 +1,7 @@ 2012-05-17 Chris Metcalf <cmetcalf@tilera.com> + * sysdeps/tile/stackguard-macros.h: Support tilegx32. + * data/c++-types-tilepro-linux-gnu.data: Renamed from data/c++-types-tile-linux-gnu.data. * data/c++-types-tilegx-linux-gnu.data: New file. diff --git a/sysdeps/tile/stackguard-macros.h b/sysdeps/tile/stackguard-macros.h index 7679c0ac00..589ea2b0d8 100644 --- a/sysdeps/tile/stackguard-macros.h +++ b/sysdeps/tile/stackguard-macros.h @@ -1,6 +1,13 @@ +#include <bits/wordsize.h> + #ifdef __tilegx__ -# define STACK_CHK_GUARD \ +# if __WORDSIZE == 64 +# define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("addi %0, tp, -16; ld %0, %0" : "=r" (x)); x; }) +# else +# define STACK_CHK_GUARD \ + ({ uintptr_t x; asm ("addi %0, tp, -8; ld4s %0, %0" : "=r" (x)); x; }) +# endif #else # define STACK_CHK_GUARD \ ({ uintptr_t x; asm ("addi %0, tp, -8; lw %0, %0" : "=r" (x)); x; }) |
