gdb/testsuite: Fix race condition in gdb.base/skip.exp
[deliverable/binutils-gdb.git] / gdb / score-tdep.c
index 19306d3464ee7cc054aa8d4ef7da5015b4216383..0ec0e35943a017ad8569f76223b5811e157038fa 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for the S+core architecture, for GDB,
    the GNU Debugger.
 
-   Copyright (C) 2006-2019 Free Software Foundation, Inc.
+   Copyright (C) 2006-2020 Free Software Foundation, Inc.
 
    Contributed by Qinwei (qinwei@sunnorth.com.cn)
    Contributed by Ching-Peng Lin (cplin@sunplus.com)
@@ -870,7 +870,7 @@ score7_analyze_prologue (CORE_ADDR startaddr, CORE_ADDR pc,
       inst_t *inst = NULL;
       if (memblock != NULL)
         {
-          /* Reading memory block from target succefully and got all
+          /* Reading memory block from target successfully and got all
              the instructions(from STARTADDR to PC) needed.  */
           score7_adjust_memblock_ptr (&memblock, prev_pc, cur_pc);
           inst = score7_fetch_inst (gdbarch, cur_pc, memblock);
@@ -918,13 +918,15 @@ score7_analyze_prologue (CORE_ADDR startaddr, CORE_ADDR pc,
                    && G_FLD (inst->v, 2, 0) == 0x0)
             {
               /* subei! r0, n */
-              sp_offset += (int) pow (2, G_FLD (inst->v, 6, 3));
+              sp_offset += (int) pow (2.0, G_FLD (inst->v, 6, 3));
             }
           else if (G_FLD (inst->v, 14, 7) == 0xc0
                    && G_FLD (inst->v, 2, 0) == 0x0)
             {
               /* addei! r0, n */
-              sp_offset -= (int) pow (2, G_FLD (inst->v, 6, 3));
+             /* Solaris 11+gcc 5.5 has ambiguous overloads of pow, so we
+                pass 2.0 instead of 2 to get the right one.  */
+              sp_offset -= (int) pow (2.0, G_FLD (inst->v, 6, 3));
             }
         }
       else
This page took 0.03094 seconds and 4 git commands to generate.