Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 // We would like to requiere more scratch registers for this stub, | 307 // We would like to requiere more scratch registers for this stub, |
| 308 // but the number of registers comes down to the ones used in | 308 // but the number of registers comes down to the ones used in |
| 309 // FullCodeGen::SetVar(), which is architecture independent. | 309 // FullCodeGen::SetVar(), which is architecture independent. |
| 310 // We allocate 2 extra scratch registers that we'll save on the stack. | 310 // We allocate 2 extra scratch registers that we'll save on the stack. |
| 311 CPURegList pool_available = GetValidRegistersForAllocation(); | 311 CPURegList pool_available = GetValidRegistersForAllocation(); |
| 312 CPURegList used_regs(object, address, scratch); | 312 CPURegList used_regs(object, address, scratch); |
| 313 pool_available.Remove(used_regs); | 313 pool_available.Remove(used_regs); |
| 314 scratch1_ = Register(pool_available.PopLowestIndex()); | 314 scratch1_ = Register(pool_available.PopLowestIndex()); |
| 315 scratch2_ = Register(pool_available.PopLowestIndex()); | 315 scratch2_ = Register(pool_available.PopLowestIndex()); |
| 316 | 316 |
| 317 // SaveCallerRegisters method needs to save caller saved register, however | 317 // SaveCallerRegisters method needs to save caller saved register, howeve |
|
Rodolph Perfetta (ARM)
2014/01/28 13:24:58
nit: however
| |
| 318 // we dont bother saving x8, x9, ip0 and ip1 because they are used as | 318 // we dont bother saving ip0 and ip1 because they are used as scratch |
| 319 // scratch registers by the MacroAssembler. | 319 // registers by the MacroAssembler. |
| 320 saved_regs_.Remove(ip0); | 320 saved_regs_.Remove(ip0); |
| 321 saved_regs_.Remove(ip1); | 321 saved_regs_.Remove(ip1); |
| 322 saved_regs_.Remove(x8); | |
| 323 saved_regs_.Remove(x9); | |
| 324 | 322 |
| 325 // The scratch registers will be restored by other means so we don't need | 323 // The scratch registers will be restored by other means so we don't need |
| 326 // to save them with the other caller saved registers. | 324 // to save them with the other caller saved registers. |
| 327 saved_regs_.Remove(scratch0_); | 325 saved_regs_.Remove(scratch0_); |
| 328 saved_regs_.Remove(scratch1_); | 326 saved_regs_.Remove(scratch1_); |
| 329 saved_regs_.Remove(scratch2_); | 327 saved_regs_.Remove(scratch2_); |
| 330 } | 328 } |
| 331 | 329 |
| 332 void Save(MacroAssembler* masm) { | 330 void Save(MacroAssembler* masm) { |
| 333 // We don't have to save scratch0_ because it was given to us as | 331 // We don't have to save scratch0_ because it was given to us as |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 573 Register length, | 571 Register length, |
| 574 Register scratch1, | 572 Register scratch1, |
| 575 Register scratch2, | 573 Register scratch2, |
| 576 Label* chars_not_equal); | 574 Label* chars_not_equal); |
| 577 }; | 575 }; |
| 578 | 576 |
| 579 | 577 |
| 580 } } // namespace v8::internal | 578 } } // namespace v8::internal |
| 581 | 579 |
| 582 #endif // V8_A64_CODE_STUBS_A64_H_ | 580 #endif // V8_A64_CODE_STUBS_A64_H_ |
| OLD | NEW |