I'm not sure whether or not anyone on this list knows the SH4 port well, might 
be worth looking at who modified this code last, to try to find someone who may 
understand this better.

cheers,
G.


On Mar 22, 2012, at 8:43 PM, [email protected] wrote:

> Hi,
> 
> If this topic should not send  to this mail address, please tell me which 
> mail address i should send this topic, thanks.
> 
> Is anyone is familair with SH-4 inline assemble in the MSVS2008 SDK, i 
> implement the ctiTrampolinen function as follow code, but it will be crashed 
> when run javascript code,
> 
> 
>  
> extern "C" {
> 
>     void __asm(const char *, ...);
> /* code (r4), RegisterFile* (r5), CallFrame* (r6), JSValue* exception (r7), 
> Profiler**(sp), JSGlobalData (sp)*/
>     EncodedJSValue ctiTrampoline(void* code, RegisterFile* registerFile, 
> CallFrame* callframe, JSValue* exception, Profiler** profiler, JSGlobalData* 
> jsGlobalData)
>     {
>         EncodedJSValue result;
>         __asm(
>             "mov.l r7, @-r15  \n"
>             "mov.l r6, @-r15  \n"
>             "mov.l r5, @-r15   \n"
>             "mov.l r8, @-r15   \n"
>             "mov #127, r8   \n"
>             "mov.l r14, @-r15  \n"
>             "sts.l pr, @-r15  \n"
>             "mov.l r13, @-r15  \n"
>             "mov.l r11, @-r15  \n"
>             "mov.l r10, @-r15  \n"
>             "add #-60, r 15  \n"
>             "mov r6, r14  \n"
>             "jsr @r4  \n"
>             "nop  \n"
>             "add #60, r15  \n"
>             "mov.l @r15+,r10  \n"
>             "mov.l @r15+,r11  \n"
>             "mov.l @r15+,r13  \n"
>             "lds.l @r15+,pr  \n"
>             "mov.l @r15+,r14  \n"
>             "mov.l @r15+,r8  \n"
>             "add #12, r15  \n"
>             "rts  \n"
>             "nop  \n"
>             "mov.l @(24,sp), r0 \n",
>             code,
>             registerFile,
>             callframe,
>             exception,
>             *profiler,
>             jsGlobalData,
>             &result
>         );
> 
>         return result;
>     }
> 
> 
> --
> BGs/Felix Shi
> 
> 
> 
> 
> _______________________________________________
> squirrelfish-dev mailing list
> [email protected]
> http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

_______________________________________________
squirrelfish-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

Reply via email to