News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

HJWasm Releases

Started by johnsa, January 16, 2016, 08:24:52 AM

Previous topic - Next topic

nidud

#45
deleted

habran

Hi there,
New version is uploaded on Terfaspace with some bug fixes and speed increase (I hope)
JJ2007, can you please test it for speed now

regards
Cod-Father

jj2007

Quote from: habran on January 22, 2016, 09:57:38 PMJJ2007, can you please test it for speed now

It has become a bit slower, sorry:
HJWasm32   : 6.3 secs->6.8
HJWasm64   : 5.2 secs->5.4

Besides, my testbed throws an exception (with both 32+64 bit versions):
  pop edx ; save return address to a global var (allocP saves edx)
  call MbAllocP ; reuse two args on stack
  push edx ; load return address and fall through to MbAddToHeapTable
MbAddToHeapTable proc
  push edx
  push ecx
  push eax ; the pointer we want to save
  sub esp, 2*16
  movups [esp], xmm0
  movups [esp+16], xmm1
  mov edx, offset MbHeapTable


Good code:
00405E4B   Ú$  5A            pop edx
00405E4C   ³.  E8 D3EDFFFF   call 00404C24
00405E51   ³.  52            push edx
00405E52   ³$  52            push edx
00405E53   ³.  51            push ecx
00405E54   ³.  50            push eax
00405E55   ³.  83EC 20       sub esp, 20
00405E58   ³.  0F110424      movups [esp], xmm0
00405E5C   ³.  0F114C24 10   movups [esp+10], xmm1              ; TestMasmBasic.00405E5C(guessed Arg1,Arg2)
00405E61   ³.  BA 30024200   mov edx, offset 00420230


Bad code:
00405E3B   Ú$  5A            pop edx                            ; TestMasmBasicHJ32.00405E3B(guessed Arg1,Arg2)
00405E3C   ³.  E8 D3EDFFFF   call 00404C14
00405E41   ³.  52            push edx
00405E42   ³$  52            push edx                           ; TestMasmBasicHJ32.00405E42(guessed Arg1,Arg2)
00405E43   ³.  51            push ecx
00405E44   ³.  50            push eax
00405E45   ³.  83EC 20       sub esp, 20
00405E48   ³.  0F110424      movups [esp], xmm0
00405E4C   ³.  0F114C24 BA   movups [esp-46], xmm1
00405E51   ³.  40            inc eax
00405E52   ³.  0242 00       add al, [edx]
00405E55   ³.  83A2 90010000 and dword ptr [edx+190], 00000000
00405E5C   ³.  0F57C0        xorps xmm0, xmm0


Hope it helps... :icon14:

nidud

#48
deleted

habran

Thanks JJ, I am surprised because I used VS "Favor fast code (/Ot)" option
The error is in OFFSET, which I will check tonight

Can you please test the one from page 2 in this thread and see if there is the same problem
Thanks nidud I will pay attention to those things you pointed out
Cod-Father

jj2007

Quote from: habran on January 23, 2016, 06:18:45 AMCan you please test the one from page 2 in this thread and see if there is the same problem

Page 2 version produces correct code.

habran

Thanks JJ,
That makes it easyer to find the error
Cod-Father

jj2007

Can you post two identical versions, one compiled with the "favour fast code" option, the other one without?

habran

#53
Here they are (fixed bug from before)
One with 'F' i the "fast" one
Cod-Father

jj2007

They both choke, so the /fast option is not the culprit :(

habran

Please explain it in a plain English
Cod-Father

jj2007

That is plain English, my friend :P

They both chokethrow exceptions, so the /fast option is not the culpritresponsible for the problem :(

habran

Now you are talking my language :biggrin:
I figure it out, the new version can not regurgitate OFFSET
I will fix that and than I will post it here
Cod-Father

habran

JJ, try now above files, I replaced them with ones that work (fingers crossed ::))
Cod-Father

jj2007

Both work fine :t
(the fast one is marginally slower :icon_mrgreen:)