Skip to content

OMake misassembling some instructions #1118

@chuggafan

Description

@chuggafan

Apparently, this is the reason my strlen implementation this time is failing, for some reason.

The exact issue:

;File test.s
;Compiler version OCC Version 7.0.1
        section code align=2        use32
        section data align=8        use32
        section bss  align=8        use32
        section const  align=8        use32
        section string  align=2        use32
        section tls  align=8 use32
        section cstartup align=2 use32
        section crundown align=2 use32
        section tstartup align=2 use32
        section trundown align=2 use32
section code
[global _main]
; main
_main:
; Line 1: int main() 
L_1:
; Line 3:     return 0;
        pmovmskb ecx, xmm0
        xor     eax,eax
; Line 4: } 
L_2:
        ret
section data
section const

When I investigate the test.exe generated from this (which for some reason is statically linking basically everything when I do occ test.s, so this somehow generates a .exe of 200kbytes in size, this includes C++ stuff), this disassembles to (per WinDBG):

_main:
0040101a 0fd7c8       pmovmskb ecx, mm0
0040101d 33c0         xor     eax, eax
0040101f c3           ret

This should be the last piece of the puzzle as to getting my strlen working.
Once my strlen is working, I'll commit it and then go back to memcpy or memmove.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions