Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: src/ia32/macro-assembler-ia32.h

Issue 3054047: IA32: Avoid going into stubs or runtime code for bitops even if the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/macro-assembler-ia32.h
===================================================================
--- src/ia32/macro-assembler-ia32.h (revision 5165)
+++ src/ia32/macro-assembler-ia32.h (working copy)
@@ -29,6 +29,7 @@
#define V8_IA32_MACRO_ASSEMBLER_IA32_H_
#include "assembler.h"
+#include "type-info.h"
namespace v8 {
namespace internal {
@@ -225,12 +226,41 @@
sar(reg, kSmiTagSize);
}
+ void SmiUntagAndBranchOnNonSmi(Register reg, TypeInfo info, Label* non_smi) {
Lasse Reichstein 2010/08/06 08:20:12 In X64 I've been naming functions like this just S
Lasse Reichstein 2010/08/06 08:20:12 Do comment that this function is destructive.
Erik Corry 2010/08/09 13:13:49 Done.
Erik Corry 2010/08/09 13:13:49 Done.
+ ASSERT(kSmiTagSize == 1);
+ sar(reg, kSmiTagSize);
+ if (info.IsSmi()) {
+ ASSERT(kSmiTag == 0);
+ j(carry, non_smi);
+ }
+ }
+
+ void SmiUntagAndBranchOnSmi(Register reg, Label* is_smi) {
+ ASSERT(kSmiTagSize == 1);
+ sar(reg, kSmiTagSize);
+ ASSERT(kSmiTag == 0);
+ j(not_carry, is_smi);
+ }
+
+ // Assumes input is a heap object.
+ void JumpIfNotNumber(Register reg, TypeInfo info, Label* on_not_number);
+
+ // Assumes input is a heap number. Jumps on things out of range. Also jumps
+ // on the min negative int32. Ignores frational parts.
Lasse Reichstein 2010/08/06 08:20:12 As stated otherwhere, the name doesn't match the f
Erik Corry 2010/08/09 13:13:49 Renamed.
+ void JumpIfNotInt32(Register reg,
+ Register scratch,
+ TypeInfo info,
+ Label* on_not_int32);
+
// Abort execution if argument is not a number. Used in debug code.
void AbortIfNotNumber(Register object);
// Abort execution if argument is not a smi. Used in debug code.
void AbortIfNotSmi(Register object);
+ // Abort execution if argument is a smi. Used in debug code.
+ void AbortIfSmi(Register object);
+
// ---------------------------------------------------------------------------
// Exception handling

Powered by Google App Engine
This is Rietveld 408576698