Author: [EMAIL PROTECTED]
Date: Wed Sep 24 09:34:00 2008
New Revision: 369

Modified:
    branches/bleeding_edge/src/codegen-ia32.cc

Log:
Don't defer the stack check failure code.  It is a CallStub, which will be  
a single 5 byte call instruction.  This should cause equivalent code size  
now, but opens up the opportunity to make one of the most common jcc's to  
use short encoding in the future.

Modified: branches/bleeding_edge/src/codegen-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/codegen-ia32.cc  (original)
+++ branches/bleeding_edge/src/codegen-ia32.cc  Wed Sep 24 09:34:00 2008
@@ -2660,30 +2660,16 @@
  }


-class StackCheckDeferred: public DeferredCode {
- public:
-  explicit StackCheckDeferred(CodeGenerator* generator)
-      : DeferredCode(generator) {
-    set_comment("[ StackCheckDeferred");
-  }
-  virtual void Generate();
-};
-
-
-void StackCheckDeferred::Generate() {
-  StackCheckStub stub;
-  __ CallStub(&stub);
-}
-
-
  void Ia32CodeGenerator::CheckStack() {
    if (FLAG_check_stack) {
-    StackCheckDeferred* deferred = new StackCheckDeferred(this);
+    Label stack_is_ok;
+    StackCheckStub stub;
      ExternalReference stack_guard_limit =
          ExternalReference::address_of_stack_guard_limit();
      __ cmp(esp, Operand::StaticVariable(stack_guard_limit));
-    __ j(below, deferred->enter(), not_taken);
-    __ bind(deferred->exit());
+    __ j(above_equal, &stack_is_ok, taken);
+    __ CallStub(&stub);
+    __ bind(&stack_is_ok);
    }
  }


--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to