[PATCH] D70515: [WebAssembly] Create a __stack_limit variable
    Sam Clegg via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 20 16:07:17 PST 2019
    
    
  
sbc100 added a comment.
Does this need to be wasm global?   Or can it just be regular data symbol like `globalBase`?   i.e. do we want fast access to it without a load?
================
Comment at: lld/wasm/Writer.cpp:221
+    sl->global->global.InitExpr.Value.Int32 = limitPtr;
+    log("mem: stack limit = " + Twine(limitPtr));
   };
----------------
Maybe avoid the extra local and just do this 4 lines above.  You can also remove the now redundant `log("mem: stack base  = " + Twine(memoryPtr));` line?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70515/new/
https://reviews.llvm.org/D70515
    
    
More information about the llvm-commits
mailing list