Ok wth is this... menu

User Tag List

Results 1 to 6 of 6
  1. #1
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ok wth is this...

    I thought I knew my calling conventions... I know my __cdecl from my __stdcall, I know how __thiscall works. I even know the rarely-used __fastcall. But what the hell is this??

    Code:
    ; Attributes: bp-based frame
    
    sub_6A9290 proc near
    
    var_2D0= qword ptr -2D0h
    var_2BC= byte ptr -2BCh
    var_2B4= dword ptr -2B4h
    var_9C= dword ptr -9Ch
    var_90= dword ptr -90h
    var_8C= dword ptr -8Ch
    var_18= dword ptr -18h
    var_14= dword ptr -14h
    var_10= dword ptr -10h
    var_9= byte ptr -9
    var_8= dword ptr -8
    var_4= dword ptr -4
    arg_0= dword ptr  8
    
    push    ebp
    mov     ebp, esp
    sub     esp, 2BCh
    push    ebx
    push    esi
    push    edi
    push    0BE0h
    mov     edi, eax
    mov     eax, [edi+4]
    Note that eax is passed in and used as-is. This doesn't conform to any of the cconvs I'm aware of, yet I've seen it a couple of times in the WoW code and it's throwing me for a loop.

    Anyone? I can certainly account for eax here, but it makes me curious. Has WoW invented a new calling convention, or is there more here than meets the eye?

    EDIT: reading x86 calling conventions - Wikipedia, the free encyclopedia, it appears that there are a LOT of calling conventions that I wasn't aware of (who knew?). But come on... is WoW really written in Delphi?

    Ok wth is this...
  2. #2
    Parog's Avatar Kitsune Da-O! M.L.G. CoreCoins Purchaser Authenticator enabled
    Reputation
    1528
    Join Date
    May 2007
    Posts
    3,160
    Thanks G/R
    540/266
    Trade Feedback
    20 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by amadmonk View Post
    is WoW really written in Delphi?

    Mods let this one go by for trolling purposes, didn't they?
    What's a Parog?
    Looking for competitive Valorant team!

  3. #3
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Parog View Post

    Mods let this one go by for trolling purposes, didn't they?
    Erm... no?

    It's a valid question.

  4. #4
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If a routine is internal to the software and all possible control paths are known at compile/link time then the compiler doesn't have to use any standard conventions. PGO for example uses REALLY ****ed up calling conventions.

    Calling conventions are there to allow you to call arbitrary functions in external code. If the code is purely internal then it doesn't have to be one of the standard conventions.


    Originally Posted by Parog View Post

    Mods let this one go by for trolling purposes, didn't they?
    Protip: If you don't understand the topic then don't post. Otherwise you just look retarded.

  5. #5
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, that makes sense. I guess I'd been relying upon calling conventions being static, but what you say is truth: it's only crucial for external calls. Profile-guided optimization is a very good example and makes sense (hell, even LTCG could conceivably come up with something nasty if it detected that no externally-accessible call graph could hit the optimized code without going through another block that "understood" the optimization).

    Thanks for the clarification; makes sense now.

  6. #6
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problemo.

Similar Threads

  1. Wth We Gonna Do If Blizzard Sees This?
    By Varthorn in forum Community Chat
    Replies: 29
    Last Post: 01-28-2007, 01:07 AM
  2. [Exploring][SW] Found this waitin for WSG...
    By chaosrevenge in forum World of Warcraft General
    Replies: 7
    Last Post: 06-14-2006, 03:24 PM
  3. dont use this !!!
    By ineedthis in forum World of Warcraft General
    Replies: 5
    Last Post: 05-16-2006, 08:48 PM
  4. Hate MySpace? Put this in someone elses comment
    By Matt in forum Community Chat
    Replies: 1
    Last Post: 04-23-2006, 03:47 PM
  5. has anyone tested this in 1.10
    By azerty1981 in forum World of Warcraft General
    Replies: 2
    Last Post: 04-01-2006, 06:09 PM
All times are GMT -5. The time now is 02:24 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search