Search
lxdream.org :: lxdream/src/sh4/ia32abi.h
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/ia32abi.h
changeset 927:17b6b9e245d8
prev926:68f3e0fe02f1
next929:fd8cb0c82f5f
next953:f4a156508ad1
author nkeynes
date Mon Dec 15 10:44:56 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change Add return-address-modifying exception return code to mmu TLB lookups (a little bit faster)
file annotate diff log raw
nkeynes@539
     1
/**
nkeynes@586
     2
 * $Id$
nkeynes@539
     3
 * 
nkeynes@926
     4
 * Provides the implementation for the ia32 ABI variant 
nkeynes@926
     5
 * (eg prologue, epilogue, and calling conventions). Stack frame is
nkeynes@926
     6
 * aligned on 16-byte boundaries for the benefit of OS X (which 
nkeynes@926
     7
 * requires it).
nkeynes@539
     8
 *
nkeynes@539
     9
 * Copyright (c) 2007 Nathan Keynes.
nkeynes@539
    10
 *
nkeynes@539
    11
 * This program is free software; you can redistribute it and/or modify
nkeynes@539
    12
 * it under the terms of the GNU General Public License as published by
nkeynes@539
    13
 * the Free Software Foundation; either version 2 of the License, or
nkeynes@539
    14
 * (at your option) any later version.
nkeynes@539
    15
 *
nkeynes@539
    16
 * This program is distributed in the hope that it will be useful,
nkeynes@539
    17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nkeynes@539
    18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nkeynes@539
    19
 * GNU General Public License for more details.
nkeynes@539
    20
 */
nkeynes@539
    21
nkeynes@926
    22
#ifndef lxdream_ia32mac_H
nkeynes@926
    23
#define lxdream_ia32mac_H 1
nkeynes@539
    24
nkeynes@539
    25
#define load_ptr( reg, ptr ) load_imm32( reg, (uint32_t)ptr );
nkeynes@539
    26
nkeynes@539
    27
/**
nkeynes@539
    28
 * Note: clobbers EAX to make the indirect call - this isn't usually
nkeynes@539
    29
 * a problem since the callee will usually clobber it anyway.
nkeynes@539
    30
 */
nkeynes@539
    31
static inline void call_func0( void *ptr )
nkeynes@539
    32
{
nkeynes@926
    33
    CALL_ptr(ptr);
nkeynes@539
    34
}
nkeynes@539
    35
nkeynes@905
    36
#ifdef HAVE_FASTCALL
nkeynes@905
    37
static inline void call_func1( void *ptr, int arg1 )
nkeynes@905
    38
{
nkeynes@905
    39
    if( arg1 != R_EAX ) {
nkeynes@905
    40
        MOV_r32_r32( arg1, R_EAX );
nkeynes@905
    41
    }
nkeynes@926
    42
    CALL_ptr(ptr);
nkeynes@905
    43
}
nkeynes@905
    44
nkeynes@905
    45
static inline void call_func2( void *ptr, int arg1, int arg2 )
nkeynes@905
    46
{
nkeynes@905
    47
    if( arg2 != R_EDX ) {
nkeynes@905
    48
        MOV_r32_r32( arg2, R_EDX );
nkeynes@905
    49
    }
nkeynes@905
    50
    if( arg1 != R_EAX ) {
nkeynes@905
    51
        MOV_r32_r32( arg1, R_EAX );
nkeynes@905
    52
    }
nkeynes@926
    53
    CALL_ptr(ptr);
nkeynes@905
    54
}
nkeynes@905
    55
nkeynes@927
    56
static inline void call_func1_exc( void *ptr, int arg1, int pc )
nkeynes@927
    57
{
nkeynes@927
    58
    if( arg1 != R_EAX ) {
nkeynes@927
    59
        MOV_r32_r32( arg1, R_EAX );
nkeynes@927
    60
    }
nkeynes@927
    61
    load_exc_backpatch(R_EDX);
nkeynes@927
    62
    CALL_ptr(ptr);
nkeynes@927
    63
}   
nkeynes@927
    64
nkeynes@927
    65
static inline void call_func2_exc( void *ptr, int arg1, int arg2, int pc )
nkeynes@927
    66
{
nkeynes@927
    67
    if( arg2 != R_EDX ) {
nkeynes@927
    68
        MOV_r32_r32( arg2, R_EDX );
nkeynes@927
    69
    }
nkeynes@927
    70
    if( arg1 != R_EAX ) {
nkeynes@927
    71
        MOV_r32_r32( arg1, R_EAX );
nkeynes@927
    72
    }
nkeynes@927
    73
    load_exc_backpatch(R_ECX);
nkeynes@927
    74
    CALL_ptr(ptr);
nkeynes@927
    75
}
nkeynes@927
    76
nkeynes@905
    77
/**
nkeynes@905
    78
 * Write a double (64-bit) value into memory, with the first word in arg2a, and
nkeynes@905
    79
 * the second in arg2b
nkeynes@905
    80
 */
nkeynes@905
    81
static inline void MEM_WRITE_DOUBLE( int addr, int arg2a, int arg2b )
nkeynes@905
    82
{
nkeynes@926
    83
    MOV_r32_esp8(addr, 0);
nkeynes@926
    84
    MOV_r32_esp8(arg2b, 4);
nkeynes@905
    85
    call_func2(sh4_write_long, addr, arg2a);
nkeynes@926
    86
    MOV_esp8_r32(0, R_EAX);
nkeynes@926
    87
    MOV_esp8_r32(4, R_EDX);
nkeynes@905
    88
    ADD_imm8s_r32(4, R_EAX);
nkeynes@905
    89
    call_func0(sh4_write_long);
nkeynes@905
    90
}
nkeynes@905
    91
nkeynes@905
    92
/**
nkeynes@905
    93
 * Read a double (64-bit) value from memory, writing the first word into arg2a
nkeynes@905
    94
 * and the second into arg2b. The addr must not be in EAX
nkeynes@905
    95
 */
nkeynes@905
    96
static inline void MEM_READ_DOUBLE( int addr, int arg2a, int arg2b )
nkeynes@905
    97
{
nkeynes@926
    98
    MOV_r32_esp8(addr, 0);
nkeynes@905
    99
    call_func1(sh4_read_long, addr);
nkeynes@926
   100
    MOV_r32_esp8(R_EAX, 4);
nkeynes@926
   101
    MOV_esp8_r32(0, R_EAX);
nkeynes@905
   102
    ADD_imm8s_r32(4, R_EAX);
nkeynes@905
   103
    call_func0(sh4_read_long);
nkeynes@905
   104
    if( arg2b != R_EAX ) {
nkeynes@905
   105
        MOV_r32_r32(R_EAX, arg2b);
nkeynes@905
   106
    }
nkeynes@926
   107
    MOV_esp8_r32(4, arg2a);
nkeynes@905
   108
}
nkeynes@905
   109
#else
nkeynes@539
   110
static inline void call_func1( void *ptr, int arg1 )
nkeynes@539
   111
{
nkeynes@926
   112
    SUB_imm8s_r32( 12, R_ESP );
nkeynes@539
   113
    PUSH_r32(arg1);
nkeynes@926
   114
    CALL_ptr(ptr);
nkeynes@926
   115
    ADD_imm8s_r32( 16, R_ESP );
nkeynes@539
   116
}
nkeynes@539
   117
nkeynes@539
   118
static inline void call_func2( void *ptr, int arg1, int arg2 )
nkeynes@539
   119
{
nkeynes@926
   120
    SUB_imm8s_r32( 8, R_ESP );
nkeynes@539
   121
    PUSH_r32(arg2);
nkeynes@539
   122
    PUSH_r32(arg1);
nkeynes@926
   123
    CALL_ptr(ptr);
nkeynes@926
   124
    ADD_imm8s_r32( 16, R_ESP );
nkeynes@539
   125
}
nkeynes@539
   126
nkeynes@539
   127
/**
nkeynes@539
   128
 * Write a double (64-bit) value into memory, with the first word in arg2a, and
nkeynes@539
   129
 * the second in arg2b
nkeynes@539
   130
 */
nkeynes@539
   131
static inline void MEM_WRITE_DOUBLE( int addr, int arg2a, int arg2b )
nkeynes@539
   132
{
nkeynes@926
   133
    SUB_imm8s_r32( 8, R_ESP );
nkeynes@539
   134
    PUSH_r32(arg2b);
nkeynes@926
   135
    LEA_r32disp8_r32( addr, 4, arg2b );
nkeynes@926
   136
    PUSH_r32(arg2b);
nkeynes@926
   137
    SUB_imm8s_r32( 8, R_ESP );
nkeynes@539
   138
    PUSH_r32(arg2a);
nkeynes@539
   139
    PUSH_r32(addr);
nkeynes@926
   140
    CALL_ptr(sh4_write_long);
nkeynes@926
   141
    ADD_imm8s_r32( 16, R_ESP );
nkeynes@926
   142
    CALL_ptr(sh4_write_long);
nkeynes@926
   143
    ADD_imm8s_r32( 16, R_ESP );
nkeynes@539
   144
}
nkeynes@539
   145
nkeynes@539
   146
/**
nkeynes@539
   147
 * Read a double (64-bit) value from memory, writing the first word into arg2a
nkeynes@539
   148
 * and the second into arg2b. The addr must not be in EAX
nkeynes@539
   149
 */
nkeynes@539
   150
static inline void MEM_READ_DOUBLE( int addr, int arg2a, int arg2b )
nkeynes@539
   151
{
nkeynes@926
   152
    SUB_imm8s_r32( 12, R_ESP );
nkeynes@539
   153
    PUSH_r32(addr);
nkeynes@926
   154
    CALL_ptr(sh4_read_long);
nkeynes@926
   155
    MOV_r32_esp8(R_EAX, 4);
nkeynes@926
   156
    ADD_imm8s_esp8(4, 0);
nkeynes@926
   157
    CALL_ptr(sh4_read_long);
nkeynes@926
   158
    if( arg2b != R_EAX ) {
nkeynes@926
   159
        MOV_r32_r32( R_EAX, arg2b );
nkeynes@926
   160
    }
nkeynes@926
   161
    MOV_esp8_r32( 4, arg2a );
nkeynes@926
   162
    ADD_imm8s_r32( 16, R_ESP );
nkeynes@539
   163
}
nkeynes@926
   164
nkeynes@905
   165
#endif
nkeynes@539
   166
nkeynes@539
   167
/**
nkeynes@539
   168
 * Emit the 'start of block' assembly. Sets up the stack frame and save
nkeynes@539
   169
 * SI/DI as required
nkeynes@926
   170
 * Allocates 8 bytes for local variables, which also has the convenient
nkeynes@926
   171
 * side-effect of aligning the stack.
nkeynes@539
   172
 */
nkeynes@901
   173
void enter_block( ) 
nkeynes@539
   174
{
nkeynes@539
   175
    PUSH_r32(R_EBP);
nkeynes@669
   176
    load_ptr( R_EBP, ((uint8_t *)&sh4r) + 128 );
nkeynes@926
   177
    SUB_imm8s_r32( 8, R_ESP ); 
nkeynes@926
   178
}
nkeynes@736
   179
nkeynes@926
   180
static inline void exit_block( )
nkeynes@926
   181
{
nkeynes@926
   182
    ADD_imm8s_r32( 8, R_ESP );
nkeynes@926
   183
    POP_r32(R_EBP);
nkeynes@926
   184
    RET();
nkeynes@539
   185
}
nkeynes@539
   186
nkeynes@539
   187
/**
nkeynes@926
   188
 * Exit the block with sh4r.new_pc written with the target pc
nkeynes@539
   189
 */
nkeynes@586
   190
void exit_block_pcset( sh4addr_t pc )
nkeynes@539
   191
{
nkeynes@539
   192
    load_imm32( R_ECX, ((pc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
nkeynes@539
   193
    ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) );    // 6
nkeynes@590
   194
    load_spreg( R_EAX, R_PC );
nkeynes@590
   195
    if( sh4_x86.tlb_on ) {
nkeynes@736
   196
        call_func1(xlat_get_code_by_vma,R_EAX);
nkeynes@590
   197
    } else {
nkeynes@736
   198
        call_func1(xlat_get_code,R_EAX);
nkeynes@926
   199
    }
nkeynes@926
   200
    exit_block();
nkeynes@590
   201
}
nkeynes@590
   202
nkeynes@590
   203
/**
nkeynes@590
   204
 * Exit the block with sh4r.new_pc written with the target pc
nkeynes@590
   205
 */
nkeynes@590
   206
void exit_block_newpcset( sh4addr_t pc )
nkeynes@590
   207
{
nkeynes@590
   208
    load_imm32( R_ECX, ((pc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
nkeynes@590
   209
    ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) );    // 6
nkeynes@590
   210
    load_spreg( R_EAX, R_NEW_PC );
nkeynes@590
   211
    store_spreg( R_EAX, R_PC );
nkeynes@586
   212
    if( sh4_x86.tlb_on ) {
nkeynes@736
   213
        call_func1(xlat_get_code_by_vma,R_EAX);
nkeynes@586
   214
    } else {
nkeynes@736
   215
        call_func1(xlat_get_code,R_EAX);
nkeynes@926
   216
    }
nkeynes@926
   217
    exit_block();
nkeynes@539
   218
}
nkeynes@539
   219
nkeynes@586
   220
nkeynes@539
   221
/**
nkeynes@539
   222
 * Exit the block to an absolute PC
nkeynes@539
   223
 */
nkeynes@926
   224
void exit_block_abs( sh4addr_t pc, sh4addr_t endpc )
nkeynes@539
   225
{
nkeynes@539
   226
    load_imm32( R_ECX, pc );                            // 5
nkeynes@539
   227
    store_spreg( R_ECX, REG_OFFSET(pc) );               // 3
nkeynes@586
   228
    if( IS_IN_ICACHE(pc) ) {
nkeynes@736
   229
        MOV_moff32_EAX( xlat_get_lut_entry(GET_ICACHE_PHYS(pc)) ); // 5
nkeynes@926
   230
        AND_imm8s_r32( 0xFC, R_EAX ); // 3
nkeynes@586
   231
    } else if( sh4_x86.tlb_on ) {
nkeynes@736
   232
        call_func1(xlat_get_code_by_vma,R_ECX);
nkeynes@586
   233
    } else {
nkeynes@736
   234
        call_func1(xlat_get_code,R_ECX);
nkeynes@586
   235
    }
nkeynes@586
   236
    load_imm32( R_ECX, ((endpc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
nkeynes@586
   237
    ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) );     // 6
nkeynes@926
   238
    exit_block();
nkeynes@586
   239
}
nkeynes@586
   240
nkeynes@586
   241
/**
nkeynes@586
   242
 * Exit the block to a relative PC
nkeynes@586
   243
 */
nkeynes@586
   244
void exit_block_rel( sh4addr_t pc, sh4addr_t endpc )
nkeynes@586
   245
{
nkeynes@586
   246
    load_imm32( R_ECX, pc - sh4_x86.block_start_pc );   // 5
nkeynes@586
   247
    ADD_sh4r_r32( R_PC, R_ECX );
nkeynes@586
   248
    store_spreg( R_ECX, REG_OFFSET(pc) );               // 3
nkeynes@586
   249
    if( IS_IN_ICACHE(pc) ) {
nkeynes@736
   250
        MOV_moff32_EAX( xlat_get_lut_entry(GET_ICACHE_PHYS(pc)) ); // 5
nkeynes@926
   251
        AND_imm8s_r32( 0xFC, R_EAX ); // 3
nkeynes@586
   252
    } else if( sh4_x86.tlb_on ) {
nkeynes@736
   253
        call_func1(xlat_get_code_by_vma,R_ECX);
nkeynes@586
   254
    } else {
nkeynes@736
   255
        call_func1(xlat_get_code,R_ECX);
nkeynes@586
   256
    }
nkeynes@539
   257
    load_imm32( R_ECX, ((endpc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
nkeynes@539
   258
    ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) );     // 6
nkeynes@926
   259
    exit_block();
nkeynes@539
   260
}
nkeynes@539
   261
nkeynes@539
   262
/**
nkeynes@539
   263
 * Write the block trailer (exception handling block)
nkeynes@539
   264
 */
nkeynes@539
   265
void sh4_translate_end_block( sh4addr_t pc ) {
nkeynes@539
   266
    if( sh4_x86.branch_taken == FALSE ) {
nkeynes@736
   267
        // Didn't exit unconditionally already, so write the termination here
nkeynes@736
   268
        exit_block_rel( pc, pc );
nkeynes@539
   269
    }
nkeynes@539
   270
    if( sh4_x86.backpatch_posn != 0 ) {
nkeynes@736
   271
        unsigned int i;
nkeynes@736
   272
        // Raise exception
nkeynes@736
   273
        uint8_t *end_ptr = xlat_output;
nkeynes@736
   274
        MOV_r32_r32( R_EDX, R_ECX );
nkeynes@736
   275
        ADD_r32_r32( R_EDX, R_ECX );
nkeynes@736
   276
        ADD_r32_sh4r( R_ECX, R_PC );
nkeynes@736
   277
        MOV_moff32_EAX( &sh4_cpu_period );
nkeynes@736
   278
        MUL_r32( R_EDX );
nkeynes@736
   279
        ADD_r32_sh4r( R_EAX, REG_OFFSET(slice_cycle) );
nkeynes@539
   280
nkeynes@926
   281
        POP_r32(R_EAX);
nkeynes@907
   282
        call_func1( sh4_raise_exception, R_EAX );
nkeynes@736
   283
        load_spreg( R_EAX, R_PC );
nkeynes@736
   284
        if( sh4_x86.tlb_on ) {
nkeynes@736
   285
            call_func1(xlat_get_code_by_vma,R_EAX);
nkeynes@736
   286
        } else {
nkeynes@736
   287
            call_func1(xlat_get_code,R_EAX);
nkeynes@736
   288
        }
nkeynes@926
   289
        exit_block();
nkeynes@539
   290
nkeynes@736
   291
        // Exception already raised - just cleanup
nkeynes@736
   292
        uint8_t *preexc_ptr = xlat_output;
nkeynes@736
   293
        MOV_r32_r32( R_EDX, R_ECX );
nkeynes@736
   294
        ADD_r32_r32( R_EDX, R_ECX );
nkeynes@736
   295
        ADD_r32_sh4r( R_ECX, R_SPC );
nkeynes@736
   296
        MOV_moff32_EAX( &sh4_cpu_period );
nkeynes@736
   297
        MUL_r32( R_EDX );
nkeynes@736
   298
        ADD_r32_sh4r( R_EAX, REG_OFFSET(slice_cycle) );
nkeynes@736
   299
        load_spreg( R_EAX, R_PC );
nkeynes@736
   300
        if( sh4_x86.tlb_on ) {
nkeynes@736
   301
            call_func1(xlat_get_code_by_vma,R_EAX);
nkeynes@736
   302
        } else {
nkeynes@736
   303
            call_func1(xlat_get_code,R_EAX);
nkeynes@736
   304
        }
nkeynes@926
   305
        exit_block();
nkeynes@586
   306
nkeynes@736
   307
        for( i=0; i< sh4_x86.backpatch_posn; i++ ) {
nkeynes@736
   308
            uint32_t *fixup_addr = (uint32_t *)&xlat_current_block->code[sh4_x86.backpatch_list[i].fixup_offset];
nkeynes@736
   309
            if( sh4_x86.backpatch_list[i].exc_code < 0 ) {
nkeynes@927
   310
                if( sh4_x86.backpatch_list[i].exc_code == -2 ) {
nkeynes@927
   311
                    *fixup_addr = (uint32_t)xlat_output;
nkeynes@927
   312
                } else {
nkeynes@927
   313
                    *fixup_addr += xlat_output - (uint8_t *)&xlat_current_block->code[sh4_x86.backpatch_list[i].fixup_offset] - 4;
nkeynes@927
   314
                }
nkeynes@736
   315
                load_imm32( R_EDX, sh4_x86.backpatch_list[i].fixup_icount );
nkeynes@736
   316
                int rel = preexc_ptr - xlat_output;
nkeynes@736
   317
                JMP_rel(rel);
nkeynes@736
   318
            } else {
nkeynes@927
   319
                *fixup_addr += xlat_output - (uint8_t *)&xlat_current_block->code[sh4_x86.backpatch_list[i].fixup_offset] - 4;
nkeynes@736
   320
                PUSH_imm32( sh4_x86.backpatch_list[i].exc_code );
nkeynes@736
   321
                load_imm32( R_EDX, sh4_x86.backpatch_list[i].fixup_icount );
nkeynes@736
   322
                int rel = end_ptr - xlat_output;
nkeynes@736
   323
                JMP_rel(rel);
nkeynes@736
   324
            }
nkeynes@736
   325
        }
nkeynes@539
   326
    }
nkeynes@539
   327
}
nkeynes@539
   328
nkeynes@926
   329
nkeynes@899
   330
/**
nkeynes@899
   331
 * The unwind methods only work if we compiled with DWARF2 frame information
nkeynes@899
   332
 * (ie -fexceptions), otherwise we have to use the direct frame scan.
nkeynes@899
   333
 */
nkeynes@899
   334
#ifdef HAVE_EXCEPTIONS
nkeynes@899
   335
#include <unwind.h>
nkeynes@899
   336
nkeynes@899
   337
struct UnwindInfo {
nkeynes@926
   338
    uintptr_t block_start;
nkeynes@926
   339
    uintptr_t block_end;
nkeynes@926
   340
    void *pc;
nkeynes@899
   341
};
nkeynes@899
   342
nkeynes@899
   343
_Unwind_Reason_Code xlat_check_frame( struct _Unwind_Context *context, void *arg )
nkeynes@899
   344
{
nkeynes@926
   345
    struct UnwindInfo *info = arg;
nkeynes@926
   346
    void *pc = (void *)_Unwind_GetIP(context);
nkeynes@926
   347
    if( ((uintptr_t)pc) >= info->block_start && ((uintptr_t)pc) < info->block_end ) {
nkeynes@926
   348
        info->pc = pc;
nkeynes@899
   349
        return _URC_NORMAL_STOP;
nkeynes@899
   350
    }
nkeynes@899
   351
nkeynes@899
   352
    return _URC_NO_REASON;
nkeynes@899
   353
}
nkeynes@899
   354
nkeynes@906
   355
void *xlat_get_native_pc( void *code, uint32_t code_size )
nkeynes@899
   356
{
nkeynes@899
   357
    struct _Unwind_Exception exc;
nkeynes@899
   358
    struct UnwindInfo info;
nkeynes@899
   359
nkeynes@926
   360
    info.pc = NULL;
nkeynes@926
   361
    info.block_start = (uintptr_t)code;
nkeynes@926
   362
    info.block_end = info.block_start + code_size;
nkeynes@899
   363
    void *result = NULL;
nkeynes@899
   364
    _Unwind_Backtrace( xlat_check_frame, &info );
nkeynes@926
   365
    return info.pc;
nkeynes@899
   366
}
nkeynes@899
   367
#else 
nkeynes@906
   368
void *xlat_get_native_pc( void *code, uint32_t code_size )
nkeynes@586
   369
{
nkeynes@586
   370
    void *result = NULL;
nkeynes@586
   371
    asm(
nkeynes@736
   372
        "mov %%ebp, %%eax\n\t"
nkeynes@736
   373
        "mov $0x8, %%ecx\n\t"
nkeynes@736
   374
        "mov %1, %%edx\n"
nkeynes@736
   375
        "frame_loop: test %%eax, %%eax\n\t"
nkeynes@736
   376
        "je frame_not_found\n\t"
nkeynes@736
   377
        "cmp (%%eax), %%edx\n\t"
nkeynes@736
   378
        "je frame_found\n\t"
nkeynes@736
   379
        "sub $0x1, %%ecx\n\t"
nkeynes@736
   380
        "je frame_not_found\n\t"
nkeynes@736
   381
        "movl (%%eax), %%eax\n\t"
nkeynes@736
   382
        "jmp frame_loop\n"
nkeynes@736
   383
        "frame_found: movl 0x4(%%eax), %0\n"
nkeynes@736
   384
        "frame_not_found:"
nkeynes@736
   385
        : "=r" (result)
nkeynes@736
   386
        : "r" (((uint8_t *)&sh4r) + 128 )
nkeynes@736
   387
        : "eax", "ecx", "edx" );
nkeynes@586
   388
    return result;
nkeynes@586
   389
}
nkeynes@899
   390
#endif
nkeynes@586
   391
nkeynes@926
   392
#endif /* !lxdream_ia32mac.h */
nkeynes@539
   393
nkeynes@539
   394
.