summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 01:56:57 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-25 01:56:57 +0000
commitd595210a3b0e5ae14126a2d50e95821cf4bed1d6 (patch)
tree47c0a424dd4ddb14ba161597a08dd4617e0ff7d1 /gcc
parent236764d9961519e4d88b0b23754ea4293d51ee49 (diff)
downloadgcc-d595210a3b0e5ae14126a2d50e95821cf4bed1d6.tar.gz
* flags.h (TLS_MODEL_GLOBAL_DYNAMIC): Set to 1.
* toplev.c (flag_tls_default) Set to TLS_MODEL_GLOBAL_DYNAMIC. * config/i386/i386.c (tls_model_chars): Add leading space. (tls_symbolic_operand): Don't bias by 1. (legitimize_address): Don't unbias by 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c7
-rw-r--r--gcc/flags.h2
-rw-r--r--gcc/toplev.c2
4 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c6ae2deef48..89ee9abef2d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2002-05-24 Richard Henderson <rth@redhat.com>
+
+ * flags.h (TLS_MODEL_GLOBAL_DYNAMIC): Set to 1.
+ * toplev.c (flag_tls_default) Set to TLS_MODEL_GLOBAL_DYNAMIC.
+ * config/i386/i386.c (tls_model_chars): Add leading space.
+ (tls_symbolic_operand): Don't bias by 1.
+ (legitimize_address): Don't unbias by 1.
+
2002-05-24 Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com>
* lcm.c (optimize_mode_switching): Change bb used as indices
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ba52c7c3eac..cf2def2393b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -546,7 +546,7 @@ rtx ix86_compare_op1 = NULL_RTX;
/* The encoding characters for the four TLS models present in ELF. */
-static char const tls_model_chars[] = "GLil";
+static char const tls_model_chars[] = " GLil";
#define MAX_386_STACK_LOCALS 3
/* Size of the register save area. */
@@ -3007,7 +3007,7 @@ tls_symbolic_operand (op, mode)
if (symbol_str[0] != '%')
return 0;
- return strchr (tls_model_chars, symbol_str[1]) - tls_model_chars + 1;
+ return strchr (tls_model_chars, symbol_str[1]) - tls_model_chars;
}
static int
@@ -5490,13 +5490,12 @@ legitimize_address (x, oldx, mode)
debug_rtx (x);
}
- /* Note that tls_symbolic_operand return is biased by 1 to return true. */
log = tls_symbolic_operand (x, mode);
if (log)
{
rtx dest, base, off, pic;
- switch (log - 1)
+ switch (log)
{
case TLS_MODEL_GLOBAL_DYNAMIC:
dest = gen_reg_rtx (Pmode);
diff --git a/gcc/flags.h b/gcc/flags.h
index 37f54d2cae5..012b63c8d45 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -466,7 +466,7 @@ extern int flag_pic;
/* Set to the default thread-local storage (tls) model to use. */
enum tls_model {
- TLS_MODEL_GLOBAL_DYNAMIC,
+ TLS_MODEL_GLOBAL_DYNAMIC = 1,
TLS_MODEL_LOCAL_DYNAMIC,
TLS_MODEL_INITIAL_EXEC,
TLS_MODEL_LOCAL_EXEC
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 13dc17d367e..b0c1d4049da 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -692,7 +692,7 @@ int flag_pic;
/* Set to the default thread-local storage (tls) model to use. */
-enum tls_model flag_tls_default;
+enum tls_model flag_tls_default = TLS_MODEL_GLOBAL_DYNAMIC;
/* Nonzero means generate extra code for exception handling and enable
exception handling. */