Re: [webkit-dev] jit for arm

2009-11-18 Thread Gavin Barraclough

From http://lists.webkit.org/:
ListDescription
webkit-help [no description available]

Hmmm, yes, there would seem to be some scope to make that a little  
more descriptive!  ;-)


G.


On Nov 17, 2009, at 11:46 PM, Zoltan Herczeg wrote:


Hi,

seems the original mail was sent to both webkit-dev and webkit-help.  
My

reply was on webkit-help, and the discussion continued there.

https://lists.webkit.org/pipermail/webkit-help/2009-November/000380.html

Perhaps we should clarify better the purpose of these mailing lists,  
since

if people can't decide which list is better for them, they do double
posts.

Zoltan


On Nov 4, 2009, at 8:37 AM, ll Jefferry wrote:


Hi,

when i reading the jit for arm source code, i am not very clear the
functionality of the flowing functions:
   ctiTrampoline


This code is used when entering from the C runtime into JIT generated
code.  JIT generated code does not necessarily respect C calling
conventions, so this routine sets up the stack frame, preserves
registers, etc, as necessary to allow the JIT code to be run.


   ctiVMThrowTrampoline


To perform certain operations the JIT will call back into C code.
Usually the C callback can just return in a perfectly normal fashion
and continue execution once it has completed, however in the case  
that

an exception is thrown special handling is required to change the
control flow.  The return address of the C callback is instead  
changed

to point to this, and this piece of code handles looking up the
exception handler at which execution will be resumed.


   ctiOpThrowNotCaught


This is used to from within cti_op_throw, which implements the  
'throw'

keyword in JavaScript.  The cti_op_throw method will attempt to look
up a handler routine that catches the exception.  However if the
exception is not caught it is necessary to force an early termination
of JIT execution.  The cti_op_throw C callback always modifies its
return address, either to point to the code for the appropriate
exception handler to catch the exception, or to ctiOpThrowNotCaught  
if

no handler is found.



could you explain to me?
and another question is that:  in cacheFlush function, why the
system call number is 0xf0002? if it is defined by the toolchain?


Zoltan, Gabor?




thanks!

BR,
Jeff

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev






___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] jit for arm

2009-11-17 Thread ll Jefferry

 Hi,



 when i reading the jit for arm source code, i am not very clear the
 functionality of the flowing functions:
 ctiTrampoline
 ctiVMThrowTrampoline
 ctiOpThrowNotCaught

 could you explain to me?
 and another question is that:  in cacheFlush function, why the system call
 number is 0xf0002? if it is defined by the toolchain?


 thanks!

 BR,
 Jeff

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] jit for arm

2009-11-17 Thread Gavin Barraclough

On Nov 4, 2009, at 8:37 AM, ll Jefferry wrote:


Hi,

when i reading the jit for arm source code, i am not very clear the  
functionality of the flowing functions:

ctiTrampoline


This code is used when entering from the C runtime into JIT generated  
code.  JIT generated code does not necessarily respect C calling  
conventions, so this routine sets up the stack frame, preserves  
registers, etc, as necessary to allow the JIT code to be run.



ctiVMThrowTrampoline


To perform certain operations the JIT will call back into C code.   
Usually the C callback can just return in a perfectly normal fashion  
and continue execution once it has completed, however in the case that  
an exception is thrown special handling is required to change the  
control flow.  The return address of the C callback is instead changed  
to point to this, and this piece of code handles looking up the  
exception handler at which execution will be resumed.



ctiOpThrowNotCaught


This is used to from within cti_op_throw, which implements the 'throw'  
keyword in JavaScript.  The cti_op_throw method will attempt to look  
up a handler routine that catches the exception.  However if the  
exception is not caught it is necessary to force an early termination  
of JIT execution.  The cti_op_throw C callback always modifies its  
return address, either to point to the code for the appropriate  
exception handler to catch the exception, or to ctiOpThrowNotCaught if  
no handler is found.




could you explain to me?
and another question is that:  in cacheFlush function, why the  
system call number is 0xf0002? if it is defined by the toolchain?


Zoltan, Gabor?




thanks!

BR,
Jeff

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] jit for arm

2009-11-17 Thread Zoltan Herczeg
Hi,

seems the original mail was sent to both webkit-dev and webkit-help. My
reply was on webkit-help, and the discussion continued there.

https://lists.webkit.org/pipermail/webkit-help/2009-November/000380.html

Perhaps we should clarify better the purpose of these mailing lists, since
if people can't decide which list is better for them, they do double
posts.

Zoltan

 On Nov 4, 2009, at 8:37 AM, ll Jefferry wrote:

 Hi,

 when i reading the jit for arm source code, i am not very clear the
 functionality of the flowing functions:
 ctiTrampoline

 This code is used when entering from the C runtime into JIT generated
 code.  JIT generated code does not necessarily respect C calling
 conventions, so this routine sets up the stack frame, preserves
 registers, etc, as necessary to allow the JIT code to be run.

 ctiVMThrowTrampoline

 To perform certain operations the JIT will call back into C code.
 Usually the C callback can just return in a perfectly normal fashion
 and continue execution once it has completed, however in the case that
 an exception is thrown special handling is required to change the
 control flow.  The return address of the C callback is instead changed
 to point to this, and this piece of code handles looking up the
 exception handler at which execution will be resumed.

 ctiOpThrowNotCaught

 This is used to from within cti_op_throw, which implements the 'throw'
 keyword in JavaScript.  The cti_op_throw method will attempt to look
 up a handler routine that catches the exception.  However if the
 exception is not caught it is necessary to force an early termination
 of JIT execution.  The cti_op_throw C callback always modifies its
 return address, either to point to the code for the appropriate
 exception handler to catch the exception, or to ctiOpThrowNotCaught if
 no handler is found.


 could you explain to me?
 and another question is that:  in cacheFlush function, why the
 system call number is 0xf0002? if it is defined by the toolchain?

 Zoltan, Gabor?



 thanks!

 BR,
 Jeff

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] JIT for arm is dependant on gcc

2009-10-21 Thread Zoltan Herczeg
Hi,

these entry/leave functions are implemented in assembly for all ports. It
is faster this way. (Previously, the jit generated these functions, but
the reviewers convinced us to do this way).

External .asm files would be a nightmare, since we have to create (and
maintain) the build rules for all ports.

Is is difficult to implement these functions for your assembler? They are
simple code fragments.

Zoltan

 I've noticed that there are three functions that use inline gcc
 assembler for compiling JIT for ARM_TRADITIONAL.  Is it possible for
 these to be reworked using the macro assembler so that JIT can be
 compiled without the gcc toolchain dependency for arm? (sp. I am using
 armasm from Microsoft?).



 Alternatively, perhaps this could be moved to an external .asm or .s
 file.  This looks like it has been done for PaintHooks.asm; so maybe
 something similar to that.



 These are the functions that I am missing trying to build JIT:



 CacheFlush, ctiTrampoline, ctiVMThrowTrampoline  ctiOpThrowNotCaught



 If there is a way to compile JIT without these dependencies please let
 me know.



 Thanks,

 Jason.



 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] JIT for arm is dependant on gcc

2009-10-21 Thread Jason Rukman
The Microsoft ARM toolchain does not support inline assembler so I'm unable to 
compile any inline assembler.  I'm trying to understand how to make these 
functions external but it doesn't appear to be straightforward (e.g. The first 
problem I hit was that the asm push instruction is unknown, also svc must be 
renamed swi and probably others. Also, I'm not able to easily create the 
pre/post stack frame for cacheflush as I haven't used 3 parameter assembler 
language before although I'm sure I could do this with a couple of hours 
research.

Can you maybe show me how to get the jit to generate this for this toolchain?

Jason.

-Original Message-
From: Zoltan Herczeg [mailto:zherc...@inf.u-szeged.hu] 
Sent: Wednesday, October 21, 2009 9:45 AM
To: Jason Rukman
Cc: webkit-dev@lists.webkit.org
Subject: Re: [webkit-dev] JIT for arm is dependant on gcc

Hi,

these entry/leave functions are implemented in assembly for all ports. It
is faster this way. (Previously, the jit generated these functions, but
the reviewers convinced us to do this way).

External .asm files would be a nightmare, since we have to create (and
maintain) the build rules for all ports.

Is is difficult to implement these functions for your assembler? They are
simple code fragments.

Zoltan

 I've noticed that there are three functions that use inline gcc
 assembler for compiling JIT for ARM_TRADITIONAL.  Is it possible for
 these to be reworked using the macro assembler so that JIT can be
 compiled without the gcc toolchain dependency for arm? (sp. I am using
 armasm from Microsoft?).



 Alternatively, perhaps this could be moved to an external .asm or .s
 file.  This looks like it has been done for PaintHooks.asm; so maybe
 something similar to that.



 These are the functions that I am missing trying to build JIT:



 CacheFlush, ctiTrampoline, ctiVMThrowTrampoline  ctiOpThrowNotCaught



 If there is a way to compile JIT without these dependencies please let
 me know.



 Thanks,

 Jason.



 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] JIT for arm is dependant on gcc

2009-10-21 Thread Zoltan Herczeg
Hi,

sorry, I don't know anything about ms arm tools (ok, not just their arm
tools).

push/pop {regs} is an alias for stmdb/ldmia sp!, { regs }

I presume you use ms os, which means you have to implement the
cacheflush() for your own os as well. (The current implementation is
designed for Linux) Unfortunately the neccessary mcr instruction can only
be executed on supervisor level, so there is no platform independent way
to implement this important function.

Zoltan

 The Microsoft ARM toolchain does not support inline assembler so I'm
 unable to compile any inline assembler.  I'm trying to understand how to
 make these functions external but it doesn't appear to be straightforward
 (e.g. The first problem I hit was that the asm push instruction is
 unknown, also svc must be renamed swi and probably others. Also, I'm not
 able to easily create the pre/post stack frame for cacheflush as I haven't
 used 3 parameter assembler language before although I'm sure I could do
 this with a couple of hours research.

 Can you maybe show me how to get the jit to generate this for this
 toolchain?

 Jason.

 -Original Message-
 From: Zoltan Herczeg [mailto:zherc...@inf.u-szeged.hu]
 Sent: Wednesday, October 21, 2009 9:45 AM
 To: Jason Rukman
 Cc: webkit-dev@lists.webkit.org
 Subject: Re: [webkit-dev] JIT for arm is dependant on gcc

 Hi,

 these entry/leave functions are implemented in assembly for all ports. It
 is faster this way. (Previously, the jit generated these functions, but
 the reviewers convinced us to do this way).

 External .asm files would be a nightmare, since we have to create (and
 maintain) the build rules for all ports.

 Is is difficult to implement these functions for your assembler? They are
 simple code fragments.

 Zoltan

 I've noticed that there are three functions that use inline gcc
 assembler for compiling JIT for ARM_TRADITIONAL.  Is it possible for
 these to be reworked using the macro assembler so that JIT can be
 compiled without the gcc toolchain dependency for arm? (sp. I am using
 armasm from Microsoft?).



 Alternatively, perhaps this could be moved to an external .asm or .s
 file.  This looks like it has been done for PaintHooks.asm; so maybe
 something similar to that.



 These are the functions that I am missing trying to build JIT:



 CacheFlush, ctiTrampoline, ctiVMThrowTrampoline  ctiOpThrowNotCaught



 If there is a way to compile JIT without these dependencies please let
 me know.



 Thanks,

 Jason.



 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev