OSDN Git Service

PR target/54121
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2012 18:44:48 +0000 (18:44 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Dec 2012 18:44:48 +0000 (18:44 +0000)
* config/sparc/sparc.md (tldo_stb_sp32): Fix pasto.
(tldo_stb_sp64): Likewise.
(tldo_sth_sp32): Likewise.
(tldo_sth_sp64): Likewise.
(tldo_stw_sp32): Likewise.
(tldo_stw_sp64): Likewise.
(tldo_stx_sp64): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@194411 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr54121.c [new file with mode: 0644]

index caa441c..7594bd6 100644 (file)
@@ -1,3 +1,14 @@
+2012-12-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR target/54121
+       * config/sparc/sparc.md (tldo_stb_sp32): Fix pasto.
+       (tldo_stb_sp64): Likewise.
+       (tldo_sth_sp32): Likewise.
+       (tldo_sth_sp64): Likewise.
+       (tldo_stw_sp32): Likewise.
+       (tldo_stw_sp64): Likewise.
+       (tldo_stx_sp64): Likewise.
+
 2012-12-10 Kai Tietz  <ktietz@redhat.com>
 
        PR target/53912
index 4787d51..8a1bab0 100644 (file)
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:SI 1 "register_operand" "r")))
-       (match_operand:QI 0 "register_operand" "=r"))]
+       (match_operand:QI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH32"
   "stb\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:DI 1 "register_operand" "r")))
-       (match_operand:QI 0 "register_operand" "=r"))]
+       (match_operand:QI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH64"
   "stb\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:SI 1 "register_operand" "r")))
-       (match_operand:HI 0 "register_operand" "=r"))]
+       (match_operand:HI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH32"
   "sth\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:DI 1 "register_operand" "r")))
-       (match_operand:HI 0 "register_operand" "=r"))]
+       (match_operand:HI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH64"
   "sth\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:SI 1 "register_operand" "r")))
-       (match_operand:SI 0 "register_operand" "=r"))]
+       (match_operand:SI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH32"
   "st\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:DI 1 "register_operand" "r")))
-       (match_operand:SI 0 "register_operand" "=r"))]
+       (match_operand:SI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH64"
   "stw\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
                                     (match_operand 3 "tld_symbolic_operand" "")]
                                    UNSPEC_TLSLDO)
                         (match_operand:DI 1 "register_operand" "r")))
-       (match_operand:DI 0 "register_operand" "=r"))]
+       (match_operand:DI 0 "register_operand" "r"))]
   "TARGET_TLS && TARGET_ARCH64"
   "stx\t%0, [%1 + %2], %%tldo_add(%3)"
   [(set_attr "type" "store")])
index b418676..51ed30a 100644 (file)
@@ -1,3 +1,7 @@
+2012-12-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/pr54121.c: New test.
+
 2012-12-07  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.dg/pr54121.c b/gcc/testsuite/gcc.dg/pr54121.c
new file mode 100644 (file)
index 0000000..b9a208e
--- /dev/null
@@ -0,0 +1,94 @@
+/* PR target/54121 */
+/* Reported by Jan Engelhardt <jengelh@inai.de> */
+
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-std=gnu99 -O -fPIC -fprofile-generate" } */
+
+typedef __SIZE_TYPE__ size_t;
+typedef unsigned char uint8_t;
+
+extern void *memcpy (void *__restrict __dest,
+       __const void *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+typedef enum {
+ LZMA_OK = 0,
+ LZMA_STREAM_END = 1,
+ LZMA_NO_CHECK = 2,
+ LZMA_UNSUPPORTED_CHECK = 3,
+ LZMA_GET_CHECK = 4,
+ LZMA_MEM_ERROR = 5,
+ LZMA_MEMLIMIT_ERROR = 6,
+ LZMA_FORMAT_ERROR = 7,
+ LZMA_OPTIONS_ERROR = 8,
+ LZMA_DATA_ERROR = 9,
+ LZMA_BUF_ERROR = 10,
+ LZMA_PROG_ERROR = 11,
+} lzma_ret;
+
+typedef enum {
+ LZMA_RUN = 0,
+ LZMA_SYNC_FLUSH = 1,
+ LZMA_FULL_FLUSH = 2,
+ LZMA_FINISH = 3
+} lzma_action;
+
+typedef struct {
+ void *( *alloc)(void *opaque, size_t nmemb, size_t size);
+ void ( *free)(void *opaque, void *ptr);
+ void *opaque;
+} lzma_allocator;
+
+typedef struct lzma_coder_s lzma_coder;
+
+typedef struct lzma_next_coder_s lzma_next_coder;
+
+typedef struct lzma_filter_info_s lzma_filter_info;
+
+typedef lzma_ret (*lzma_init_function)(
+  lzma_next_coder *next, lzma_allocator *allocator,
+  const lzma_filter_info *filters);
+
+typedef lzma_ret (*lzma_code_function)(
+  lzma_coder *coder, lzma_allocator *allocator,
+  const uint8_t *restrict in, size_t *restrict in_pos,
+  size_t in_size, uint8_t *restrict out,
+  size_t *restrict out_pos, size_t out_size,
+  lzma_action action);
+
+typedef void (*lzma_end_function)(
+  lzma_coder *coder, lzma_allocator *allocator);
+
+typedef struct {
+ uint8_t *buf;
+ size_t pos;
+ size_t size;
+} lzma_dict;
+
+typedef struct {
+ lzma_coder *coder;
+ lzma_ret (*code)(lzma_coder *restrict coder,
+   lzma_dict *restrict dict, const uint8_t *restrict in,
+   size_t *restrict in_pos, size_t in_size);
+} lzma_lz_decoder;
+
+struct lzma_coder_s {
+ lzma_dict dict;
+ lzma_lz_decoder lz;
+};
+
+lzma_ret
+decode_buffer(lzma_coder *coder,
+  const uint8_t *restrict in, size_t *restrict in_pos,
+  size_t in_size, uint8_t *restrict out, size_t *restrict out_pos)
+{
+ while (1) {
+  const size_t dict_start = coder->dict.pos;
+  const lzma_ret ret
+    = coder->lz.code( coder->lz.coder, &coder->dict, in, in_pos, in_size);
+  const size_t copy_size = coder->dict.pos - dict_start;
+  memcpy(out + *out_pos, coder->dict.buf + dict_start, copy_size);
+  if (ret != LZMA_OK || coder->dict.pos < coder->dict.size)
+   return ret;
+ }
+}