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

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

Issue 139503006: A64: Implement pre-aging support for A64. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: 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
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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1937 // recently run) and continues. A young function is therefore one which has a 1937 // recently run) and continues. A young function is therefore one which has a
1938 // normal frame setup sequence, and an old function has a code age sequence 1938 // normal frame setup sequence, and an old function has a code age sequence
1939 // which calls a code ageing stub. 1939 // which calls a code ageing stub.
1940 1940
1941 // Set up a basic stack frame for young code (or code exempt from ageing) with 1941 // Set up a basic stack frame for young code (or code exempt from ageing) with
1942 // type FUNCTION. It may be patched later for code ageing support. This is 1942 // type FUNCTION. It may be patched later for code ageing support. This is
1943 // done by to Code::PatchPlatformCodeAge and EmitCodeAgeSequence. 1943 // done by to Code::PatchPlatformCodeAge and EmitCodeAgeSequence.
1944 // 1944 //
1945 // This function takes an Assembler so it can be called from either a 1945 // This function takes an Assembler so it can be called from either a
1946 // MacroAssembler or a PatchingAssembler context. 1946 // MacroAssembler or a PatchingAssembler context.
1947 static void EmitFrameSetupForCodeAgePatching(Assembler * assm); 1947 static void EmitFrameSetupForCodeAgePatching(Assembler* assm);
1948 1948
1949 // Call EmitFrameSetupForCodeAgePatching from a MacroAssembler context. 1949 // Call EmitFrameSetupForCodeAgePatching from a MacroAssembler context.
1950 void EmitFrameSetupForCodeAgePatching(); 1950 void EmitFrameSetupForCodeAgePatching();
1951 1951
1952 // Emit a code age sequence that calls the relevant code age stub. The code 1952 // Emit a code age sequence that calls the relevant code age stub. The code
1953 // generated by this sequence is expected to replace the code generated by 1953 // generated by this sequence is expected to replace the code generated by
1954 // EmitFrameSetupForCodeAgePatching, and represents an old function. 1954 // EmitFrameSetupForCodeAgePatching, and represents an old function.
1955 // 1955 //
1956 // It never makes sense to call this other than in a patching context, so this
1957 // method only accepts a PatchingAssembler.
1958 //
1959 // If stub is NULL, this function generates the code age sequence but omits 1956 // If stub is NULL, this function generates the code age sequence but omits
1960 // the stub address that is normally embedded in the instruction stream. This 1957 // the stub address that is normally embedded in the instruction stream. This
1961 // can be used by debug code to verify code age sequences. 1958 // can be used by debug code to verify code age sequences.
1962 static void EmitCodeAgeSequence(PatchingAssembler * assm, Code * stub); 1959 static void EmitCodeAgeSequence(Assembler* assm, Code* stub);
1960
1961 // Call EmitCodeAgeSequence from a MacroAssembler context.
1962 void EmitCodeAgeSequence(Code* stub);
1963 1963
1964 // Return true if the sequence is a young sequence geneated by 1964 // Return true if the sequence is a young sequence geneated by
1965 // EmitFrameSetupForCodeAgePatching. Otherwise, this method asserts that the 1965 // EmitFrameSetupForCodeAgePatching. Otherwise, this method asserts that the
1966 // sequence is a code age sequence (emitted by EmitCodeAgeSequence). 1966 // sequence is a code age sequence (emitted by EmitCodeAgeSequence).
1967 static bool IsYoungSequence(byte* sequence); 1967 static bool IsYoungSequence(byte* sequence);
1968 1968
1969 #ifdef DEBUG 1969 #ifdef DEBUG
1970 // Return true if the sequence is a code age sequence generated by 1970 // Return true if the sequence is a code age sequence generated by
1971 // EmitCodeAgeSequence. 1971 // EmitCodeAgeSequence.
1972 static bool IsCodeAgeSequence(byte* sequence); 1972 static bool IsCodeAgeSequence(byte* sequence);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 #error "Unsupported option" 2184 #error "Unsupported option"
2185 #define CODE_COVERAGE_STRINGIFY(x) #x 2185 #define CODE_COVERAGE_STRINGIFY(x) #x
2186 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 2186 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
2187 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 2187 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
2188 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 2188 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
2189 #else 2189 #else
2190 #define ACCESS_MASM(masm) masm-> 2190 #define ACCESS_MASM(masm) masm->
2191 #endif 2191 #endif
2192 2192
2193 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ 2193 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698