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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6342019: ARM: Initial type recording binary operation stub... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 bind(&fail); 1932 bind(&fail);
1933 Abort("Global functions must have initial map"); 1933 Abort("Global functions must have initial map");
1934 bind(&ok); 1934 bind(&ok);
1935 } 1935 }
1936 } 1936 }
1937 1937
1938 1938
1939 void MacroAssembler::JumpIfNotBothSmi(Register reg1, 1939 void MacroAssembler::JumpIfNotBothSmi(Register reg1,
1940 Register reg2, 1940 Register reg2,
1941 Label* on_not_both_smi) { 1941 Label* on_not_both_smi) {
1942 ASSERT_EQ(0, kSmiTag); 1942 STATIC_ASSERT(kSmiTag == 0);
1943 tst(reg1, Operand(kSmiTagMask)); 1943 tst(reg1, Operand(kSmiTagMask));
1944 tst(reg2, Operand(kSmiTagMask), eq); 1944 tst(reg2, Operand(kSmiTagMask), eq);
1945 b(ne, on_not_both_smi); 1945 b(ne, on_not_both_smi);
1946 } 1946 }
1947 1947
1948 1948
1949 void MacroAssembler::JumpIfEitherSmi(Register reg1, 1949 void MacroAssembler::JumpIfEitherSmi(Register reg1,
1950 Register reg2, 1950 Register reg2,
1951 Label* on_either_smi) { 1951 Label* on_either_smi) {
1952 ASSERT_EQ(0, kSmiTag); 1952 STATIC_ASSERT(kSmiTag == 0);
1953 tst(reg1, Operand(kSmiTagMask)); 1953 tst(reg1, Operand(kSmiTagMask));
1954 tst(reg2, Operand(kSmiTagMask), ne); 1954 tst(reg2, Operand(kSmiTagMask), ne);
1955 b(eq, on_either_smi); 1955 b(eq, on_either_smi);
1956 } 1956 }
1957 1957
1958 1958
1959 void MacroAssembler::AbortIfSmi(Register object) { 1959 void MacroAssembler::AbortIfSmi(Register object) {
1960 ASSERT_EQ(0, kSmiTag); 1960 STATIC_ASSERT(kSmiTag == 0);
1961 tst(object, Operand(kSmiTagMask)); 1961 tst(object, Operand(kSmiTagMask));
1962 Assert(ne, "Operand is a smi"); 1962 Assert(ne, "Operand is a smi");
1963 } 1963 }
1964 1964
1965 1965
1966 void MacroAssembler::AbortIfNotSmi(Register object) { 1966 void MacroAssembler::AbortIfNotSmi(Register object) {
1967 ASSERT_EQ(0, kSmiTag); 1967 STATIC_ASSERT(kSmiTag == 0);
1968 tst(object, Operand(kSmiTagMask)); 1968 tst(object, Operand(kSmiTagMask));
1969 Assert(eq, "Operand is not smi"); 1969 Assert(eq, "Operand is not smi");
1970 } 1970 }
1971 1971
1972 1972
1973 void MacroAssembler::JumpIfNotHeapNumber(Register object,
1974 Register heap_number_map,
1975 Register scratch,
1976 Label* on_not_heap_number) {
1977 ldr(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
1978 AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
1979 cmp(scratch, heap_number_map);
1980 b(ne, on_not_heap_number);
1981 }
1982
1983
1973 void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings( 1984 void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings(
1974 Register first, 1985 Register first,
1975 Register second, 1986 Register second,
1976 Register scratch1, 1987 Register scratch1,
1977 Register scratch2, 1988 Register scratch2,
1978 Label* failure) { 1989 Label* failure) {
1979 // Test that both first and second are sequential ASCII strings. 1990 // Test that both first and second are sequential ASCII strings.
1980 // Assume that they are non-smis. 1991 // Assume that they are non-smis.
1981 ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset)); 1992 ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
1982 ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset)); 1993 ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
1983 ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset)); 1994 ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
1984 ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset)); 1995 ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
1985 1996
1986 JumpIfBothInstanceTypesAreNotSequentialAscii(scratch1, 1997 JumpIfBothInstanceTypesAreNotSequentialAscii(scratch1,
1987 scratch2, 1998 scratch2,
1988 scratch1, 1999 scratch1,
1989 scratch2, 2000 scratch2,
1990 failure); 2001 failure);
1991 } 2002 }
1992 2003
1993 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first, 2004 void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first,
1994 Register second, 2005 Register second,
1995 Register scratch1, 2006 Register scratch1,
1996 Register scratch2, 2007 Register scratch2,
1997 Label* failure) { 2008 Label* failure) {
1998 // Check that neither is a smi. 2009 // Check that neither is a smi.
1999 ASSERT_EQ(0, kSmiTag); 2010 STATIC_ASSERT(kSmiTag == 0);
2000 and_(scratch1, first, Operand(second)); 2011 and_(scratch1, first, Operand(second));
2001 tst(scratch1, Operand(kSmiTagMask)); 2012 tst(scratch1, Operand(kSmiTagMask));
2002 b(eq, failure); 2013 b(eq, failure);
2003 JumpIfNonSmisNotBothSequentialAsciiStrings(first, 2014 JumpIfNonSmisNotBothSequentialAsciiStrings(first,
2004 second, 2015 second,
2005 scratch1, 2016 scratch1,
2006 scratch2, 2017 scratch2,
2007 failure); 2018 failure);
2008 } 2019 }
2009 2020
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 2256
2246 void CodePatcher::Emit(Address addr) { 2257 void CodePatcher::Emit(Address addr) {
2247 masm()->emit(reinterpret_cast<Instr>(addr)); 2258 masm()->emit(reinterpret_cast<Instr>(addr));
2248 } 2259 }
2249 #endif // ENABLE_DEBUGGER_SUPPORT 2260 #endif // ENABLE_DEBUGGER_SUPPORT
2250 2261
2251 2262
2252 } } // namespace v8::internal 2263 } } // namespace v8::internal
2253 2264
2254 #endif // V8_TARGET_ARCH_ARM 2265 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698