Re: [webkit-dev] want to port JIT to MIPS - using X86::ecx as base

2009-02-06 Thread x yz
1.what's the meaning of ALTERNATE_JSIMMEDIATE and slow case?
2.how come the following code can use ECX as base register?
 load32(Address(X86::ecx, FIELD_OFFSET(Structure, m_typeInfo.m_flags)), 
X86::ecx);
if the X86::ecx just means its value 1 in ModR/M, does it means [BX+DI]? 
3. can anybody help me on my previous questions? does JIT support floating 
point?
many thanks
joe

--- On Tue, 2/3/09, x yz last...@yahoo.com wrote:

 From: x yz last...@yahoo.com
 Subject: Re: [webkit-dev] want to port JIT to MIPS - IEEE ques
 To: Gavin Barraclough barraclo...@apple.com, WebKit Development 
 webkit-dev@lists.webkit.org
 Date: Tuesday, February 3, 2009, 9:08 AM
 1. Thanks for more info. Although X86 Linux gcc uses
 regparam(3), I think MIPS ABI always asks $a0~a3/@v0~v1 for
 i/o?
 2. It seems I can get rid of 64bit OP if
 JIT_OPTIMIZE_ARITHMETIC and 
 ALTERNATE_JSIMMEDIATE are both disabled? 
 3. is it ALTERNATE_JSIMMEDIATE for ecma-262?
 4. does JIT support floating point? if yes why it is not
 under jit/asm?
 rgds
 joe
 
 --- On Wed, 1/28/09, Gavin Barraclough
 barraclo...@apple.com wrote:
 
  From: Gavin Barraclough barraclo...@apple.com
  Subject: Re: [webkit-dev] want to port JIT to MIPS,
 any coworker or any hint?
  To: last...@yahoo.com
  Date: Wednesday, January 28, 2009, 4:55 PM
  On Jan 27, 2009, at 10:58 PM, x yz wrote:
  
   Gavin,
   last night I saw WREC when I search X86, and
 realized
  many places  
   need to be touched. Your reply give more info and
  really help.  
   Thanks a lot.
  
   In Generator::generateEnter(), there is comment
  On gcc the function  
   is regparm(3)..., how to understand that?
  
  WREC JIT generates a function with a C calling
 convention
  that  
  implements the regular expression.  The entry and exit
 from
  the  
  function are generated by the generateEnter() and
  generateReturn*()  
  methods.  On OS X x86, the JIT generated function
  implements a  
  regparm(3) calling convention (see WREC.h, the
 generated
  code is  
  called through a CompiledRegExp function pointer).
  
   The function has no argument, why we peek four
  arguments from  
   stack(input,output,length,index)?
  
  These calls are not peeking values from the stack at
 the
  time they are  
  called; they are emitting JIT code that will will read
  values from the  
  stack, when the JIT function has been generated and is
 run.
   The JIT  
  generated regular expression function is passed these
 four
  arguments  
  (again see WREC.h).
  
  As a note, you're best directing these emails at
 the
  webkit-dev list  
  in future, that way other people will also be able to
 help
  you out.
  
  cheers,
  G.
  
  
  
   rgds
   joe
  
  
   --- On Tue, 1/27/09, Gavin Barraclough
  barraclo...@apple.com wrote:
  
   From: Gavin Barraclough
  barraclo...@apple.com
   Subject: Re: [webkit-dev] want to port JIT to
  MIPS, any coworker or  
   any hint?
   To: last...@yahoo.com
   Date: Tuesday, January 27, 2009, 5:10 AM
   On Jan 26, 2009, at 11:09 AM, x yz wrote:
  
   Gavin,
   Thanks, I really need to learn fast.
   Where can I find more on WREC or its
 spec?
  
   WREC is WebKit's regular expression JIT. 
 The
  spec it
   is implementing is the regular expression
 syntax
  described
   in ECMA-262.
  
   Which part of webkit is WREC? I just see
 all
  assembler
   codes are in assembler and
 jit and
  wonder
   whether I can just change them rather then
 change
  WREC.
  
   WebKit contains two separate JITs, one for
 the
  JavaScript
   language (in the 'jit' directory),
 one for
   JavaScript's regular expression language
 (in
  the
   'wrec' directory).  Both JITs make
 use of
  the same
   assembler to emit code.  WREC is a much
 smaller,
  simpler
   JIT, which is why I suggest starting by
 looking at
  this, but
   either JIT can be enabled independently of
 the
  other.
  
   Foresee SSE set may be a problem as MIPS
 has
  no SSE.
  
   WREC does not use SSE, and I believe all JIT
 code
  generated
   by the main JS JIT is guarded by the a
  configuration switch,
   JIT_OPTIMIZE_ARITHMETIC – this can be
 disabled
  in
   Platform.h.
  
   Sun's link for The JIT Compiler
  Interface
   Specification not valid anymore.
  
   Our JIT is all our own code, and written from
  scratch, so
   I'm not sure this documentation would
 help
  you.
  
   Good luck,
   G.
  
  
   MacroAssembler::breakpoint() is just int3
  which I know
   used as debug int in X86. I'll see which
 one
  used in gnu
   mips.
   joe
  
  
  
   --- On Sun, 1/25/09, Gavin Barraclough
   barraclo...@apple.com wrote:
  
   From: Gavin Barraclough
   barraclo...@apple.com
   Subject: Re: [webkit-dev] want to
 port JIT
  to
   MIPS, any coworker or any hint?
   To: WebKit Development
   webkit-dev@lists.webkit.org
   Date: Sunday, January 25, 2009, 5:34
 PM
   On Jan 24, 2009, at 8:36 PM, x yz
 wrote:
  
   Just build webkit on XP using
 cgywin,
  not
   tested yet.
   I want to port to 32bit MIPS, it
 seems I
  need to
   

Re: [webkit-dev] want to port JIT to MIPS - using X86::ecx as base

2009-02-06 Thread Gavin Barraclough

On Feb 6, 2009, at 2:52 PM, x yz wrote:


1.what's the meaning of ALTERNATE_JSIMMEDIATE and slow case?


On x86-64 we use a different implementation of the class JSImmediate.   
See JSImmediate.h.
Re 'slow case', in the JIT code generation is performed as two passes  
over the bytecode – see JIT::privateCompileMainPass and  
JIT::privateCompileSlowCases.



2.how come the following code can use ECX as base register?
load32(Address(X86::ecx, FIELD_OFFSET(Structure,  
m_typeInfo.m_flags)), X86::ecx);
if the X86::ecx just means its value 1 in ModR/M, does it means [BX 
+DI]?


I think you're looking at the old 16-bit addressing mode tables; 32/64- 
bit x86 can happily encode ecx as a base register.  If you're looking  
at the Intel IA-32 manual volume 2, see table 2-2 on the next page.


3. can anybody help me on my previous questions? does JIT support  
floating point?


Yes, some.  See JITArithmetic.cpp.

 cheers,
G.


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