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

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

Issue 2220313002: S390: Decouple Add/Sub/Neg to 32/64 Bit Op (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Neg32 to use lcr Created 4 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 unified diff | Download patch
« no previous file with comments | « src/s390/disasm-s390.cc ('k') | src/s390/macro-assembler-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_S390_MACRO_ASSEMBLER_S390_H_ 5 #ifndef V8_S390_MACRO_ASSEMBLER_S390_H_
6 #define V8_S390_MACRO_ASSEMBLER_S390_H_ 6 #define V8_S390_MACRO_ASSEMBLER_S390_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void LoadAndTestP(Register dst, Register src); 346 void LoadAndTestP(Register dst, Register src);
347 347
348 void LoadAndTest32(Register dst, const MemOperand& opnd); 348 void LoadAndTest32(Register dst, const MemOperand& opnd);
349 void LoadAndTestP(Register dst, const MemOperand& opnd); 349 void LoadAndTestP(Register dst, const MemOperand& opnd);
350 350
351 // Load Floating Point 351 // Load Floating Point
352 void LoadDouble(DoubleRegister dst, const MemOperand& opnd); 352 void LoadDouble(DoubleRegister dst, const MemOperand& opnd);
353 void LoadFloat32(DoubleRegister dst, const MemOperand& opnd); 353 void LoadFloat32(DoubleRegister dst, const MemOperand& opnd);
354 void LoadFloat32ConvertToDouble(DoubleRegister dst, const MemOperand& mem); 354 void LoadFloat32ConvertToDouble(DoubleRegister dst, const MemOperand& mem);
355 355
356 // Load On Condition
357 void LoadOnConditionP(Condition cond, Register dst, Register src);
358
356 // Store Floating Point 359 // Store Floating Point
357 void StoreDouble(DoubleRegister dst, const MemOperand& opnd); 360 void StoreDouble(DoubleRegister dst, const MemOperand& opnd);
358 void StoreFloat32(DoubleRegister dst, const MemOperand& opnd); 361 void StoreFloat32(DoubleRegister dst, const MemOperand& opnd);
359 void StoreDoubleAsFloat32(DoubleRegister src, const MemOperand& mem, 362 void StoreDoubleAsFloat32(DoubleRegister src, const MemOperand& mem,
360 DoubleRegister scratch); 363 DoubleRegister scratch);
361 364
362 void Branch(Condition c, const Operand& opnd); 365 void Branch(Condition c, const Operand& opnd);
363 void BranchOnCount(Register r1, Label* l); 366 void BranchOnCount(Register r1, Label* l);
364 367
365 // Shifts 368 // Shifts
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 void TruncateHeapNumberToI(Register result, Register object); 1222 void TruncateHeapNumberToI(Register result, Register object);
1220 1223
1221 // Converts the smi or heap number in object to an int32 using the rules 1224 // Converts the smi or heap number in object to an int32 using the rules
1222 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated 1225 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated
1223 // and brought into the range -2^31 .. +2^31 - 1. 'result' and 'input' must be 1226 // and brought into the range -2^31 .. +2^31 - 1. 'result' and 'input' must be
1224 // different registers. 1227 // different registers.
1225 void TruncateNumberToI(Register object, Register result, 1228 void TruncateNumberToI(Register object, Register result,
1226 Register heap_number_map, Register scratch1, 1229 Register heap_number_map, Register scratch1,
1227 Label* not_int32); 1230 Label* not_int32);
1228 1231
1229 // Overflow handling functions.
1230 // Usage: call the appropriate arithmetic function and then call one of the
1231 // flow control functions with the corresponding label.
1232
1233 // Compute dst = left + right, setting condition codes. dst may be same as
1234 // either left or right (or a unique register). left and right must not be
1235 // the same register.
1236 void AddAndCheckForOverflow(Register dst, Register left, Register right,
1237 Register overflow_dst, Register scratch = r0);
1238 void AddAndCheckForOverflow(Register dst, Register left, intptr_t right,
1239 Register overflow_dst, Register scratch = r0);
1240
1241 // Compute dst = left - right, setting condition codes. dst may be same as
1242 // either left or right (or a unique register). left and right must not be
1243 // the same register.
1244 void SubAndCheckForOverflow(Register dst, Register left, Register right,
1245 Register overflow_dst, Register scratch = r0);
1246
1247 void BranchOnOverflow(Label* label) { blt(label /*, cr0*/); }
1248
1249 void BranchOnNoOverflow(Label* label) { bge(label /*, cr0*/); }
1250
1251 void RetOnOverflow(void) {
1252 Label label;
1253
1254 blt(&label /*, cr0*/);
1255 Ret();
1256 bind(&label);
1257 }
1258
1259 void RetOnNoOverflow(void) {
1260 Label label;
1261
1262 bge(&label /*, cr0*/);
1263 Ret();
1264 bind(&label);
1265 }
1266
1267 // --------------------------------------------------------------------------- 1232 // ---------------------------------------------------------------------------
1268 // Runtime calls 1233 // Runtime calls
1269 1234
1270 // Call a code stub. 1235 // Call a code stub.
1271 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), 1236 void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(),
1272 Condition cond = al); 1237 Condition cond = al);
1273 1238
1274 // Call a code stub. 1239 // Call a code stub.
1275 void TailCallStub(CodeStub* stub, Condition cond = al); 1240 void TailCallStub(CodeStub* stub, Condition cond = al);
1276 1241
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 inline MemOperand NativeContextMemOperand() { 1875 inline MemOperand NativeContextMemOperand() {
1911 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX); 1876 return ContextMemOperand(cp, Context::NATIVE_CONTEXT_INDEX);
1912 } 1877 }
1913 1878
1914 #define ACCESS_MASM(masm) masm-> 1879 #define ACCESS_MASM(masm) masm->
1915 1880
1916 } // namespace internal 1881 } // namespace internal
1917 } // namespace v8 1882 } // namespace v8
1918 1883
1919 #endif // V8_S390_MACRO_ASSEMBLER_S390_H_ 1884 #endif // V8_S390_MACRO_ASSEMBLER_S390_H_
OLDNEW
« no previous file with comments | « src/s390/disasm-s390.cc ('k') | src/s390/macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698