]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target-m68k/op_helper.c
Fix off-by-one errors for Altivec and SPE registers
[mirror_qemu.git] / target-m68k / op_helper.c
index f45c4d97c8f9edf7165bfc7344e19848631930bb..a339a179c0306ee494f017673750b7630a45bc0f 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA  02110-1301 USA
  */
 #include "exec.h"
 #include "helpers.h"
@@ -32,11 +32,6 @@ void do_interrupt(int is_hw)
 extern int semihosting_enabled;
 
 #define MMUSUFFIX _mmu
-#ifdef __s390__
-# define GETPC() ((void*)((unsigned long)__builtin_return_address(0) & 0x7fffffffUL))
-#else
-# define GETPC() (__builtin_return_address(0))
-#endif
 
 #define SHIFT 0
 #include "softmmu_template.h"
@@ -66,7 +61,7 @@ void tlb_fill (target_ulong addr, int is_write, int mmu_idx, void *retaddr)
     saved_env = env;
     env = cpu_single_env;
     ret = cpu_m68k_handle_mmu_fault(env, addr, is_write, mmu_idx, 1);
-    if (__builtin_expect(ret, 0)) {
+    if (unlikely(ret)) {
         if (retaddr) {
             /* now we have a real cpu fault */
             pc = (unsigned long)retaddr;
@@ -229,4 +224,3 @@ void HELPER(divs)(CPUState *env, uint32_t word)
     env->div2 = rem;
     env->cc_dest = flags;
 }
-