News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Modified JWasm

Started by habran, March 01, 2012, 02:42:17 AM

Previous topic - Next topic

habran

If we are assembler programmers we should be aware of our code's products and of our tools capability
and anyway we should check what the compiler does with our code

I hope that Japhet has got some time spare to work on the JWasm2.07 

regards

johnsa

Agreed. For now I can totally live with the LOCAL issue, if and when I create a simd local, i'll just group them together first (after prologue) as that way they're aligned perfectly.

I'm really hoping for a bumper 2.07 release with all of this stuff factored in plus all of his bug-fixes.
I'd even wait another month or two for it if we could get symbolic debugging.


habran

Here is some more improvements of JWasm
When you have  option win64:1 first 4 registers are saved to shadow spaces
but without checking if parameters have being used or not
sometimes we use only register direct and don't need shadow spaces
and it saves amount of code written and increases the speed
this version saves only parameters which you use in the function

here is changed source:
file:
proc.c
line 1958

static void win64_SaveRegParams( struct proc_info *info )
/*******************************************************/
{
    int i;
    struct dsym *param;

    for ( i = 0, param = info->paralist; param && ( i < 4 ); i++ ) {
        /* v2.05: save XMMx if type is float/double */
        if ( param->sym.is_vararg == FALSE ) {
            if ( (param->sym.mem_type & MT_FLOAT) && param->sym.used )  // added  && param->sym.used
                AddLineQueueX( "movq [%r+%u], %r", T_RSP, 8 + i * 8, T_XMM0 + i );
            else
if(param->sym.used)                                    //here as well
                AddLineQueueX( "mov [%r+%u], %r", T_RSP, 8 + i * 8, ms64_regs[i] );
            param = param->nextparam;
        }
    }
    return;
}

and here are binaries:

johnsa

More good work there!

Spoke to Japheth, he's primarily focused on jwlink at present, so that's receiving any attention that his time permits. So to be honest i'm really not sure when we can expect 2.07 let alone the CV8 features. I mentioned my idea of perhaps "tweaking" the OBJ file
to be more compatible with V8, but he reckons it can only be done from inside jwasm using it's structures/tables to produce the correct output.

I asked if he would factor these changes into 2.07 (as listed in this thread) but he says he doesn't want to include any more in that release. I'm hoping at least then he will release the source so that the changes can be factored in.

I've download the latest PE/COFF spec (so I'm assuming that should comform to cv8 even though they don't mention it by name).

Are you compiling this in VC or PellesC?
I thought maybe I should put my C hatred aside and join in and see if we can start getting the CV8 output.

I know I'm insane.. but I actually use asm for some commercial work. I have a couple projects which are in excess of 100k lines, so to be able to debug stuff comfortably is quite key for me. 32bit has been beautiful, but it's time for me to start porting some of these commercial works to 64bit. Heck.. When I think how much i've paid over time for things like Visual Studio, and so-far I've had to pay nothing for my asm coding, I'd be more than happy to PAY someone to get this done quick :)

habran

I am using both VC10 EXPRES and also PellesC but PellesC.mak running with console - not studio and it does all the job properly
let us work together
I am still looking for improvement of this source

johnsa

Have you been able to get it to build inside the IDE (without make file)?
I've tried several times now with both and it's just an endless list of issues..

habran

I did not try PellesC IDE, only PellesC.mak from the JWasm source bfolder
But VC2010 Expres works fine you just have to tweak it
here is what I have:

habran

you should be able to build it easy with PellesC.mak if you open the command line from JWasm folder and you set C:\PellesC\bin\pomake -f PellesC.mak


johnsa

Hey,

Yeah I can get a perfect build from command line using the make file...

I wanted to be able to run from IDE/debug mode to actual step through and see whats going on..

Tried your solution file, gave me the same 4400 errors...

things like structs that aren't valid...

Error   2   error C2016: C requires that a struct or union has at least one member   e:\jwasmsolution\globals.h   504   1   JWasm
Error   3   error C2061: syntax error : identifier 'bool'   e:\jwasmsolution\globals.h   504   1   JWasm
Error   4   error C2061: syntax error : identifier 'line_numbers'   e:\jwasmsolution\globals.h   505   1   JWasm
Error   5   error C2059: syntax error : ';'   e:\jwasmsolution\globals.h   505   1   JWasm
Error   6   error C2061: syntax error : identifier 'warning_error'   e:\jwasmsolution\globals.h   513   1   JWasm
Error   7   error C2059: syntax error : ';'   e:\jwasmsolution\globals.h   513   1   JWasm
Error   8   error C2061: syntax error : identifier 'no_comment_data_in_code_records'   e:\jwasmsolution\globals.h   526   1   JWasm

and so on.. 4400 times before the compiler just gave up

habran

If you want I can send you compressed folder with my solution inside
I have your email address

habran

I have succeeded to build debug version and it works
In the folder is solution set up for debug version

johnsa

That would be great thanks! Then I'll start investigating the CV8 stuff. Are you code changes already in the source? (Saves me re-applying them).


habran

they are, did you check your email?

johnsa

Yeah.. nothing came through at all... you can also try meeku.jh@gmail.com

habran