| 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 4524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4535 | 4535 |
| 4536 static const int kMaxArgCount = 4; | 4536 static const int kMaxArgCount = 4; |
| 4537 // Assume that we have the maximum number of arguments until we know | 4537 // Assume that we have the maximum number of arguments until we know |
| 4538 // otherwise. | 4538 // otherwise. |
| 4539 int arg_count = kMaxArgCount; | 4539 int arg_count = kMaxArgCount; |
| 4540 | 4540 |
| 4541 // The provided arguments. | 4541 // The provided arguments. |
| 4542 CPURegister args[kMaxArgCount] = {arg0, arg1, arg2, arg3}; | 4542 CPURegister args[kMaxArgCount] = {arg0, arg1, arg2, arg3}; |
| 4543 | 4543 |
| 4544 // The PCS registers where the arguments need to end up. | 4544 // The PCS registers where the arguments need to end up. |
| 4545 CPURegister pcs[kMaxArgCount]; | 4545 CPURegister pcs[kMaxArgCount] = {NoCPUReg, NoCPUReg, NoCPUReg, NoCPUReg}; |
| 4546 | 4546 |
| 4547 // Promote FP arguments to doubles, and integer arguments to X registers. | 4547 // Promote FP arguments to doubles, and integer arguments to X registers. |
| 4548 // Note that FP and integer arguments cannot be mixed, but we'll check | 4548 // Note that FP and integer arguments cannot be mixed, but we'll check |
| 4549 // AreSameSizeAndType once we've processed these promotions. | 4549 // AreSameSizeAndType once we've processed these promotions. |
| 4550 for (int i = 0; i < kMaxArgCount; i++) { | 4550 for (int i = 0; i < kMaxArgCount; i++) { |
| 4551 if (args[i].IsRegister()) { | 4551 if (args[i].IsRegister()) { |
| 4552 // Note that we use x1 onwards, because x0 will hold the format string. | 4552 // Note that we use x1 onwards, because x0 will hold the format string. |
| 4553 pcs[i] = Register::XRegFromCode(i + 1); | 4553 pcs[i] = Register::XRegFromCode(i + 1); |
| 4554 // For simplicity, we handle all integer arguments as X registers. An X | 4554 // For simplicity, we handle all integer arguments as X registers. An X |
| 4555 // register argument takes the same space as a W register argument in the | 4555 // register argument takes the same space as a W register argument in the |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4830 } | 4830 } |
| 4831 } | 4831 } |
| 4832 | 4832 |
| 4833 | 4833 |
| 4834 #undef __ | 4834 #undef __ |
| 4835 | 4835 |
| 4836 | 4836 |
| 4837 } } // namespace v8::internal | 4837 } } // namespace v8::internal |
| 4838 | 4838 |
| 4839 #endif // V8_TARGET_ARCH_A64 | 4839 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |