#53 look at me

open
nobody
None
5
2013-09-27
2013-09-25
BlackMaple
No

sorry my poor English
don't laugh at me

local dwSizeA:dword
local dwSizeB:dword

Made

push ebp
mov ebp,esp
sub esp,08H

i thank

push ebp
mov ebp,esp
push ecx
push ecx

.if !eax
.endif

made

or eax,eax
jne xxxx

i thank

test eax,eax
jne xxxxx

Discussion

  • japheth

    japheth - 2013-09-25

    I guess you want to suggest to change the generated code.

    This would be relatively easy to do, but

    a) I don't see the benefit of your suggestions
    b) your suggestions aren't Masm-compatible

     
  • BlackMaple

    BlackMaple - 2013-09-26

    local variable length <=8
    made
    "sub esp,8" code length 3 bytes
    but
    "push ecx
    push ecx "
    2 bytes
    code length 2 bytes

    may run slower :(
    "or eax,eax " change "test eax,eax"
    "test eax,eax" vc++ is so :)

     
  • japheth

    japheth - 2013-09-26

    You're right, the code generated by Masm/JWasm isn't the shortest possible.

    But although it is one byte longer, it most likely won't run slower, but faster.

    if it is vitally important that the code is the shortest possible, there are 2 options:

    1. don't use PROC/LOCAL/ENDP, do things manually
    2. use PROC/LOCAL/ENDP, but use your own macros for prologue/epilogue generation
     
  • BlackMaple

    BlackMaple - 2013-09-27

    thanks
    谢谢你

    about 2
    关于第二条

    do you help me ?
    你能帮助我嘛?

    Can you cite some simple examples to me?
    你能给我举一些简单的例子?

    i think vc++ uesd "test eax,eax" but jwasm/masm don‘t use
    why ?

     
    Last edit: BlackMaple 2013-09-27

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks