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

Side by Side Diff: third_party/WebKit/Source/platform/heap/asm/SaveRegisters_x86.asm

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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
OLDNEW
1 ;; Copyright (C) 2013 Google Inc. All rights reserved. 1 ;; Copyright (C) 2013 Google Inc. All rights reserved.
2 ;; 2 ;;
3 ;; Redistribution and use in source and binary forms, with or without 3 ;; Redistribution and use in source and binary forms, with or without
4 ;; modification, are permitted provided that the following conditions are 4 ;; modification, are permitted provided that the following conditions are
5 ;; met: 5 ;; met:
6 ;; 6 ;;
7 ;; * Redistributions of source code must retain the above copyright 7 ;; * Redistributions of source code must retain the above copyright
8 ;; notice, this list of conditions and the following disclaimer. 8 ;; notice, this list of conditions and the following disclaimer.
9 ;; * Redistributions in binary form must reproduce the above 9 ;; * Redistributions in binary form must reproduce the above
10 ;; copyright notice, this list of conditions and the following disclaimer 10 ;; copyright notice, this list of conditions and the following disclaimer
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 %define PRIVATE :hidden 58 %define PRIVATE :hidden
59 %elifidn __OUTPUT_FORMAT__,elfx32 59 %elifidn __OUTPUT_FORMAT__,elfx32
60 %define PRIVATE :hidden 60 %define PRIVATE :hidden
61 %elif X64WIN 61 %elif X64WIN
62 %define PRIVATE 62 %define PRIVATE
63 %else 63 %else
64 %define PRIVATE :private_extern 64 %define PRIVATE :private_extern
65 %endif 65 %endif
66 66
67 ;; typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, int ptr_t*); 67 ;; typedef void (*PushAllRegistersCallback)(SafePointBarrier*, ThreadState*, int ptr_t*);
68 ;; extern "C" void pushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegi stersCallback) 68 ;; extern "C" void PushAllRegisters(SafePointBarrier*, ThreadState*, PushAllRegi stersCallback)
69 69
70 global mangle(pushAllRegisters) PRIVATE 70 global mangle(PushAllRegisters) PRIVATE
71 71
72 %if X64POSIX 72 %if X64POSIX
73 73
74 mangle(pushAllRegisters): 74 mangle(PushAllRegisters):
75 ;; Push all callee-saves registers to get them 75 ;; Push all callee-saves registers to get them
76 ;; on the stack for conservative stack scanning. 76 ;; on the stack for conservative stack scanning.
77 ;; We maintain 16-byte alignment at calls (required on Mac). 77 ;; We maintain 16-byte alignment at calls (required on Mac).
78 ;; There is an 8-byte return address on the stack and we push 78 ;; There is an 8-byte return address on the stack and we push
79 ;; 56 bytes which maintains 16-byte stack alignment 79 ;; 56 bytes which maintains 16-byte stack alignment
80 ;; at the call. 80 ;; at the call.
81 push 0 81 push 0
82 push rbx 82 push rbx
83 push rbp 83 push rbp
84 push r12 84 push r12
85 push r13 85 push r13
86 push r14 86 push r14
87 push r15 87 push r15
88 ;; Pass the two first arguments unchanged (rdi, rsi) 88 ;; Pass the two first arguments unchanged (rdi, rsi)
89 ;; and the stack pointer after pushing callee-saved 89 ;; and the stack pointer after pushing callee-saved
90 ;; registers to the callback. 90 ;; registers to the callback.
91 mov r8, rdx 91 mov r8, rdx
92 mov rdx, rsp 92 mov rdx, rsp
93 call r8 93 call r8
94 ;; Pop the callee-saved registers. None of them were 94 ;; Pop the callee-saved registers. None of them were
95 ;; modified so no restoring is needed. 95 ;; modified so no restoring is needed.
96 add rsp, 56 96 add rsp, 56
97 ret 97 ret
98 98
99 %elif X64WIN 99 %elif X64WIN
100 100
101 mangle(pushAllRegisters): 101 mangle(PushAllRegisters):
102 ;; Push all callee-saves registers to get them 102 ;; Push all callee-saves registers to get them
103 ;; on the stack for conservative stack scanning. 103 ;; on the stack for conservative stack scanning.
104 ;; There is an 8-byte return address on the stack and we push 104 ;; There is an 8-byte return address on the stack and we push
105 ;; 72 bytes which maintains the required 16-byte stack alignment 105 ;; 72 bytes which maintains the required 16-byte stack alignment
106 ;; at the call. 106 ;; at the call.
107 push 0 107 push 0
108 push rsi 108 push rsi
109 push rdi 109 push rdi
110 push rbx 110 push rbx
111 push rbp 111 push rbp
112 push r12 112 push r12
113 push r13 113 push r13
114 push r14 114 push r14
115 push r15 115 push r15
116 ;; Pass the two first arguments unchanged (rcx, rdx) 116 ;; Pass the two first arguments unchanged (rcx, rdx)
117 ;; and the stack pointer after pushing callee-saved 117 ;; and the stack pointer after pushing callee-saved
118 ;; registers to the callback. 118 ;; registers to the callback.
119 mov r9, r8 119 mov r9, r8
120 mov r8, rsp 120 mov r8, rsp
121 call r9 121 call r9
122 ;; Pop the callee-saved registers. None of them were 122 ;; Pop the callee-saved registers. None of them were
123 ;; modified so no restoring is needed. 123 ;; modified so no restoring is needed.
124 add rsp, 72 124 add rsp, 72
125 ret 125 ret
126 126
127 %elif IA32 127 %elif IA32
128 128
129 mangle(pushAllRegisters): 129 mangle(PushAllRegisters):
130 ;; Push all callee-saves registers to get them 130 ;; Push all callee-saves registers to get them
131 ;; on the stack for conservative stack scanning. 131 ;; on the stack for conservative stack scanning.
132 ;; We maintain 16-byte alignment at calls (required on 132 ;; We maintain 16-byte alignment at calls (required on
133 ;; Mac). There is a 4-byte return address on the stack 133 ;; Mac). There is a 4-byte return address on the stack
134 ;; and we push 28 bytes which maintains 16-byte alignment 134 ;; and we push 28 bytes which maintains 16-byte alignment
135 ;; at the call. 135 ;; at the call.
136 push ebx 136 push ebx
137 push ebp 137 push ebp
138 push esi 138 push esi
139 push edi 139 push edi
(...skipping 10 matching lines...) Expand all
150 ;; so we do not need to restore them. 150 ;; so we do not need to restore them.
151 add esp, 28 151 add esp, 28
152 ret 152 ret
153 153
154 154
155 %elif ARM 155 %elif ARM
156 %error "Yasm does not support arm. Use SaveRegisters_arm.S on arm." 156 %error "Yasm does not support arm. Use SaveRegisters_arm.S on arm."
157 %else 157 %else
158 %error "Unsupported platform." 158 %error "Unsupported platform."
159 %endif 159 %endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698