public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Re: frysk-core frysk/pkglibdir/funit-asm.h frysk/p ...
       [not found] <20070205223652.854.qmail@sourceware.org>
@ 2007-02-05 23:06 ` Andrew Cagney
  2007-02-06 11:23 ` Mark Wielaard
  1 sibling, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2007-02-05 23:06 UTC (permalink / raw)
  To: frysk

npremji@sourceware.org wrote:
> 	frysk/rt/CL
> 	* TestStackFrame.java: Changed testcases to reflect movement to single test
> 	file. Marked test cases as broken on x86_64.
> 	
> 	frysk/pkglibdir/CL
> 	* funit-asm.h: Added tags for ENTER_MAIN and COMPARE on 386.
>   

Nurdin,

Noticed a few things:

-> The definition:
  #define COMPARE(REG,CONST) cmpl $CONST, (REG)
-- as the opening comment in frysk-asm.h explains:
// This file provides a collection macros that map a very simple
// load-store virtual machine onto a concrete ISA.  See the end of
// this file for more details.
this is a load-store architecture which, implicitly, does not support 
operations such as direct compare with a memory address.  Instead the 
value must first be loaded and then either compare-with-register or 
compare-immediate used.
-- it doesn't match this existing definition at the end, i.e., compare 
two registers.
#ifndef COMPARE
#define COMPARE(LHS_REG,RHS_REG) Set compare flags according to 
LHS_REG-RHS_REG
#endif

-> looking at ENTER_MAIN:
        ENTER_MAIN(REG3, REG4)
        ENTER
it's functionality should encompass the existing ENTER macro i.e., 
create the stack frame while simultaneously ensuring that ARGC and ARGV 
are moved into registers.  Eliminating the need to specify both macros.  
Having them in registers avoids issues such as 32-bit vs 64-bit register 
sizes.

Andrew


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: frysk-core frysk/pkglibdir/funit-asm.h frysk/p ...
       [not found] <20070205223652.854.qmail@sourceware.org>
  2007-02-05 23:06 ` frysk-core frysk/pkglibdir/funit-asm.h frysk/p Andrew Cagney
@ 2007-02-06 11:23 ` Mark Wielaard
  1 sibling, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2007-02-06 11:23 UTC (permalink / raw)
  To: frysk; +Cc: npremji

Hi Nurdin,

On Mon, 2007-02-05 at 22:36 +0000, npremji@sourceware.org wrote:
> 	frysk/pkglibdir/CL
> 	* funit-asm.h: Added tags for ENTER_MAIN and COMPARE on 386.
> 	* funit-stacframe.S: Added. Contains :
> 	* funit-stackframe-asm.S: Removed.
> 	* funit-stackframe-static-asm.S: Ditto.
> 	* funit-stackframe.c: Removed before.
> 	* funit-stackframe-static.c: Ditto.
> 
> Patches:
> http://sourceware.org/cgi-bin/cvsweb.cgi/frysk-core/frysk/pkglibdir/funit-stackframe-asm.S.diff?cvsroot=frysk&r1=1.3&r2=NONE
> [...]
> .globl main
> 	.type	main, @function
> main:
> 	ENTER_MAIN(REG3, REG4)
> 	ENTER
> 	pushl REG3

That doesn't compile on x86_64. I made the following change which seems
to compile on both x86 and x86_64 and makes all tests in make check PASS
(except for the 32on64 tests, see next mail). Hope it is correct.

2007-02-06  Mark Wielaard  <mark@klomp.org>

        * funit-stackframe.S (main): Use push, not pushl.

Cheers,

Mark

diff -u -r1.1 funit-stackframe.S
--- frysk-core/frysk/pkglibdir/funit-stackframe.S       5 Feb 2007 22:36:51 -0000       1.1
+++ frysk-core/frysk/pkglibdir/funit-stackframe.S       6 Feb 2007 10:59:04 -0000
@@ -82,7 +82,7 @@
 main:
        ENTER_MAIN(REG3, REG4)
        ENTER
-       pushl REG3
+       push REG3
 # If argc = 1 run with global_st_size.
        COMPARE(REG3, 1)
        JUMP_NE(.L10)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-06 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20070205223652.854.qmail@sourceware.org>
2007-02-05 23:06 ` frysk-core frysk/pkglibdir/funit-asm.h frysk/p Andrew Cagney
2007-02-06 11:23 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).