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

Side by Side Diff: src/assembler.cpp

Issue 1027593002: Subzero: Support non-IRT immediate calls with -filetype=iasm. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Use --defsym= in both places for consistency Created 5 years, 9 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
« no previous file with comments | « src/IceFixups.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/assembler.cpp - Assembler base class -------------------===// 1 //===- subzero/src/assembler.cpp - Assembler base class -------------------===//
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 // 5 //
6 // Modified by the Subzero authors. 6 // Modified by the Subzero authors.
7 // 7 //
8 // This is forked from Dart revision 39313. 8 // This is forked from Dart revision 39313.
9 // Please update the revision if we merge back changes from Dart. 9 // Please update the revision if we merge back changes from Dart.
10 // https://code.google.com/p/dart/wiki/GettingTheSource 10 // https://code.google.com/p/dart/wiki/GettingTheSource
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 intptr_t CurPosition = 0; 129 intptr_t CurPosition = 0;
130 const intptr_t FixupSize = 4; 130 const intptr_t FixupSize = 4;
131 for (const AssemblerFixup *NextFixup : fixups()) { 131 for (const AssemblerFixup *NextFixup : fixups()) {
132 intptr_t NextFixupLoc = NextFixup->position(); 132 intptr_t NextFixupLoc = NextFixup->position();
133 for (intptr_t i = CurPosition; i < NextFixupLoc; ++i) { 133 for (intptr_t i = CurPosition; i < NextFixupLoc; ++i) {
134 Str << "\t.byte 0x"; 134 Str << "\t.byte 0x";
135 Str.write_hex(buffer_.Load<uint8_t>(i)); 135 Str.write_hex(buffer_.Load<uint8_t>(i));
136 Str << "\n"; 136 Str << "\n";
137 } 137 }
138 Str << "\t.long "; 138 Str << "\t.long ";
139 NextFixup->emit(Ctx); 139 NextFixup->emit(Ctx, buffer_.Load<RelocOffsetT>(NextFixupLoc));
140 if (fixupIsPCRel(NextFixup->kind())) 140 if (fixupIsPCRel(NextFixup->kind()))
141 Str << " - (. + " << FixupSize << ")"; 141 Str << " - .";
142 Str << "\n"; 142 Str << "\n";
143 CurPosition = NextFixupLoc + FixupSize; 143 CurPosition = NextFixupLoc + FixupSize;
144 assert(CurPosition <= EndPosition); 144 assert(CurPosition <= EndPosition);
145 } 145 }
146 // Handle any bytes that are not prefixed by a fixup. 146 // Handle any bytes that are not prefixed by a fixup.
147 for (intptr_t i = CurPosition; i < EndPosition; ++i) { 147 for (intptr_t i = CurPosition; i < EndPosition; ++i) {
148 Str << "\t.byte 0x"; 148 Str << "\t.byte 0x";
149 Str.write_hex(buffer_.Load<uint8_t>(i)); 149 Str.write_hex(buffer_.Load<uint8_t>(i));
150 Str << "\n"; 150 Str << "\n";
151 } 151 }
152 } 152 }
153 153
154 } // end of namespace Ice 154 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceFixups.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698