OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3951 __ movq(rbp_as_smi.reg(), rbp); | 3951 __ movq(rbp_as_smi.reg(), rbp); |
3952 frame_->Push(&rbp_as_smi); | 3952 frame_->Push(&rbp_as_smi); |
3953 } | 3953 } |
3954 | 3954 |
3955 | 3955 |
3956 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { | 3956 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { |
3957 ASSERT(args->length() == 0); | 3957 ASSERT(args->length() == 0); |
3958 frame_->SpillAll(); | 3958 frame_->SpillAll(); |
3959 __ push(rsi); | 3959 __ push(rsi); |
3960 | 3960 |
3961 int num_arguments = 0; | 3961 static const int num_arguments = 0; |
3962 __ PrepareCallCFunction(num_arguments); | 3962 __ PrepareCallCFunction(num_arguments); |
3963 | 3963 |
3964 // Call V8::RandomPositiveSmi(). | 3964 // Call V8::RandomPositiveSmi(). |
3965 __ CallCFunction(ExternalReference::random_positive_smi_function(), | 3965 __ CallCFunction(ExternalReference::random_positive_smi_function(), |
3966 num_arguments); | 3966 num_arguments); |
3967 | 3967 |
3968 __ pop(rsi); | 3968 __ pop(rsi); |
3969 Result result = allocator_->Allocate(rax); | 3969 Result result = allocator_->Allocate(rax); |
3970 frame_->Push(&result); | 3970 frame_->Push(&result); |
3971 } | 3971 } |
(...skipping 5530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9502 // Call the function from C++. | 9502 // Call the function from C++. |
9503 return FUNCTION_CAST<ModuloFunction>(buffer); | 9503 return FUNCTION_CAST<ModuloFunction>(buffer); |
9504 } | 9504 } |
9505 | 9505 |
9506 #endif | 9506 #endif |
9507 | 9507 |
9508 | 9508 |
9509 #undef __ | 9509 #undef __ |
9510 | 9510 |
9511 } } // namespace v8::internal | 9511 } } // namespace v8::internal |
OLD | NEW |