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

Side by Side Diff: src/a64/macro-assembler-a64.h

Issue 131333011: A64: When truncating to an int, store the result in a 64bit register (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: updates Created 6 years, 10 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/a64/lithium-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 void InvokeFunction(Handle<JSFunction> function, 1087 void InvokeFunction(Handle<JSFunction> function,
1088 const ParameterCount& expected, 1088 const ParameterCount& expected,
1089 const ParameterCount& actual, 1089 const ParameterCount& actual,
1090 InvokeFlag flag, 1090 InvokeFlag flag,
1091 const CallWrapper& call_wrapper); 1091 const CallWrapper& call_wrapper);
1092 1092
1093 1093
1094 // ---- Floating point helpers ---- 1094 // ---- Floating point helpers ----
1095 1095
1096 enum ECMA262ToInt32Result { 1096 enum ECMA262ToInt32Result {
1097 // Provide an untagged int32_t which can be read using result.W(). That is,
1098 // the upper 32 bits of result are undefined.
1099 INT32_IN_W,
1100
1101 // Provide an untagged int32_t which can be read using the 64-bit result 1097 // Provide an untagged int32_t which can be read using the 64-bit result
1102 // register. The int32_t result is sign-extended. 1098 // register. The int32_t result is sign-extended.
1103 INT32_IN_X, 1099 INT32,
1104 1100
1105 // Tag the int32_t result as a smi. 1101 // Tag the int32_t result as a smi.
1106 SMI 1102 SMI
1107 }; 1103 };
1108 1104
1109 // Applies ECMA-262 ToInt32 (see section 9.5) to a double value. 1105 // Applies ECMA-262 ToInt32 (see section 9.5) to a double value.
1110 void ECMA262ToInt32(Register result, 1106 void ECMA262ToInt32(Register result,
1111 DoubleRegister input, 1107 DoubleRegister input,
1112 Register scratch1, 1108 Register scratch1,
1113 Register scratch2, 1109 Register scratch2,
1114 ECMA262ToInt32Result format = INT32_IN_X); 1110 ECMA262ToInt32Result format = INT32);
1115 1111
1116 // As ECMA262ToInt32, but operate on a HeapNumber. 1112 // As ECMA262ToInt32, but operate on a HeapNumber.
1117 void HeapNumberECMA262ToInt32(Register result, 1113 void HeapNumberECMA262ToInt32(Register result,
1118 Register heap_number, 1114 Register heap_number,
1119 Register scratch1, 1115 Register scratch1,
1120 Register scratch2, 1116 Register scratch2,
1121 DoubleRegister double_scratch, 1117 DoubleRegister double_scratch,
1122 ECMA262ToInt32Result format = INT32_IN_X); 1118 ECMA262ToInt32Result format = INT32);
1123 1119
1124 // ---- Code generation helpers ---- 1120 // ---- Code generation helpers ----
1125 1121
1126 void set_generating_stub(bool value) { generating_stub_ = value; } 1122 void set_generating_stub(bool value) { generating_stub_ = value; }
1127 bool generating_stub() const { return generating_stub_; } 1123 bool generating_stub() const { return generating_stub_; }
1128 #if DEBUG 1124 #if DEBUG
1129 void set_allow_macro_instructions(bool value) { 1125 void set_allow_macro_instructions(bool value) {
1130 allow_macro_instructions_ = value; 1126 allow_macro_instructions_ = value;
1131 } 1127 }
1132 bool allow_macro_instructions() const { return allow_macro_instructions_; } 1128 bool allow_macro_instructions() const { return allow_macro_instructions_; }
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 #error "Unsupported option" 2179 #error "Unsupported option"
2184 #define CODE_COVERAGE_STRINGIFY(x) #x 2180 #define CODE_COVERAGE_STRINGIFY(x) #x
2185 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2181 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2186 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2182 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2187 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2183 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2188 #else 2184 #else
2189 #define ACCESS_MASM(masm) masm-> 2185 #define ACCESS_MASM(masm) masm->
2190 #endif 2186 #endif
2191 2187
2192 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ 2188 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_
OLDNEW
« no previous file with comments | « src/a64/lithium-codegen-a64.cc ('k') | src/a64/macro-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698