Workaround dyngen problems with m68k conditional branch ops.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2968 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									0cf5c6771b
								
							
						
					
					
						commit
						06d92f40a1
					
				| 
						 | 
					@ -103,3 +103,28 @@ static inline void gen_op_goto_tb(int dummy, int n, long tb)
 | 
				
			||||||
        gen_op_goto_tb1(TBPARAM(tb));
 | 
					        gen_op_goto_tb1(TBPARAM(tb));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void gen_op_jmp_z32(int val, int label)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    gen_op_set_T0_z32(val);
 | 
				
			||||||
 | 
					    gen_op_jmp_T0(label);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void gen_op_jmp_nz32(int val, int label)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    gen_op_set_T0_nz32(val);
 | 
				
			||||||
 | 
					    gen_op_jmp_T0(label);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void gen_op_jmp_s32(int val, int label)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    gen_op_set_T0_s32(val);
 | 
				
			||||||
 | 
					    gen_op_jmp_T0(label);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static inline void gen_op_jmp_ns32(int val, int label)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    gen_op_set_T0_ns32(val);
 | 
				
			||||||
 | 
					    gen_op_jmp_T0(label);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -487,37 +487,38 @@ OP(jmp)
 | 
				
			||||||
    GOTO_LABEL_PARAM(1);
 | 
					    GOTO_LABEL_PARAM(1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* These ops involve a function call, which probably requires a stack frame
 | 
					OP(set_T0_z32)
 | 
				
			||||||
   and breaks things on some hosts.  */
 | 
					 | 
				
			||||||
OP(jmp_z32)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    uint32_t arg = get_op(PARAM1);
 | 
					    uint32_t arg = get_op(PARAM1);
 | 
				
			||||||
    if (arg == 0)
 | 
					    T0 = (arg == 0);
 | 
				
			||||||
        GOTO_LABEL_PARAM(2);
 | 
					 | 
				
			||||||
    FORCE_RET();
 | 
					    FORCE_RET();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OP(jmp_nz32)
 | 
					OP(set_T0_nz32)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    uint32_t arg = get_op(PARAM1);
 | 
					    uint32_t arg = get_op(PARAM1);
 | 
				
			||||||
    if (arg != 0)
 | 
					    T0 = (arg != 0);
 | 
				
			||||||
        GOTO_LABEL_PARAM(2);
 | 
					 | 
				
			||||||
    FORCE_RET();
 | 
					    FORCE_RET();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OP(jmp_s32)
 | 
					OP(set_T0_s32)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int32_t arg = get_op(PARAM1);
 | 
					    int32_t arg = get_op(PARAM1);
 | 
				
			||||||
    if (arg < 0)
 | 
					    T0 = (arg > 0);
 | 
				
			||||||
        GOTO_LABEL_PARAM(2);
 | 
					 | 
				
			||||||
    FORCE_RET();
 | 
					    FORCE_RET();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OP(jmp_ns32)
 | 
					OP(set_T0_ns32)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int32_t arg = get_op(PARAM1);
 | 
					    int32_t arg = get_op(PARAM1);
 | 
				
			||||||
    if (arg >= 0)
 | 
					    T0 = (arg >= 0);
 | 
				
			||||||
        GOTO_LABEL_PARAM(2);
 | 
					    FORCE_RET();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OP(jmp_T0)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (T0)
 | 
				
			||||||
 | 
					        GOTO_LABEL_PARAM(1);
 | 
				
			||||||
    FORCE_RET();
 | 
					    FORCE_RET();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue