Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(467)

Issue 13431045: Forward-port nacl assembler hacks (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by khim
Modified:
11 years, 10 months ago
Reviewers:
Roland McGrath
CC:
native-client-reviews_googlegroups.com
Base URL:
http://git.chromium.org/native_client/nacl-binutils.git@nacl-hacks
Visibility:
Public.

Description

Forward-port nacl assembler hacks Most changes are not really needed because they can be replaced with .bundle_lock/.bundle_unlock directives, but call handling can not be emulated. Simple test to verify changes: $ cat test.s calltest: call calltarget1 call calltarget2 call calltarget3 call externtarget .p2align 5 regular_instruction: .fill 30,1,0x90 calltarget1: mov %rax,%rax .p2align 5 nacl_instruction: .fill 27,1,0x90 calltarget2: mov %nacl:(%r15,%rax),%rax .p2align 5 bundle_instruction: .fill 27,1,0x90 calltarget3: .bundle_lock lea (%rax),%eax mov (%r15,%rax),%rax .bundle_unlock $ x86_64-nacl-as --64 test.s -o test.o $ objdump -dr test.o test.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <calltest>: ... 1b: e8 7e 00 00 00 callq 9e <calltarget1> ... 3b: e8 9b 00 00 00 callq db <calltarget2> ... 5b: e8 bb 00 00 00 callq 11b <calltarget3> ... 7b: e8 00 00 00 00 callq 80 <regular_instruction> 7c: R_X86_64_PC32 externtarget-0x4 0000000000000080 <regular_instruction>: ... 000000000000009e <calltarget1>: 9e: 66 90 xchg %ax,%ax a0: 48 89 c0 mov %rax,%rax ... 00000000000000db <calltarget2>: db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) e0: 89 c0 mov %eax,%eax e2: 49 8b 04 07 mov (%r15,%rax,1),%rax ... 000000000000011b <calltarget3>: 11b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 120: 8d 00 lea (%rax),%eax 122: 49 8b 04 07 mov (%r15,%rax,1),%rax Note relocation's handling and how all the instructions are correctly moved to the end of bundle (for calls) or to the next bundle (for other instructions). R=mcgrathr@chromium.org Committed: https://git.chromium.org/gitweb?p=native_client/nacl-gcc.git;a=commit;h=48ea2e3

Patch Set 1 #

Patch Set 2 : Removed Makefile.{am,in} changed (6 lines), added i386-tbl.h changes (3342 lines) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2469 lines, -1490 lines) Patch
M gas/config/tc-i386.c View 34 chunks +492 lines, -35 lines 0 comments Download
M gas/config/tc-i386-intel.c View 1 chunk +1 line, -1 line 0 comments Download
M gas/frags.h View 1 chunk +12 lines, -0 lines 0 comments Download
M gas/write.c View 5 chunks +42 lines, -1 line 0 comments Download
M opcodes/i386-opc.tbl View 1 chunk +33 lines, -0 lines 0 comments Download
M opcodes/i386-tbl.h View 17 chunks +1889 lines, -1453 lines 0 comments Download

Messages

Total messages: 5
khim
11 years, 10 months ago (2013-09-14 00:31:08 UTC) #1
Roland McGrath
Drop opcodes/Makefile* changes. Otherwise LGTM.
11 years, 10 months ago (2013-09-16 16:49:07 UTC) #2
khim
On 2013/09/16 16:49:07, Roland McGrath wrote: > Drop opcodes/Makefile* changes. Removal of opcodes/Makefile* changes means ...
11 years, 10 months ago (2013-09-16 16:58:55 UTC) #3
Roland McGrath
On 2013/09/16 16:58:55, khim wrote: > On 2013/09/16 16:49:07, Roland McGrath wrote: > > Drop ...
11 years, 10 months ago (2013-09-16 17:18:39 UTC) #4
khim
11 years, 10 months ago (2013-09-16 21:01:00 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r48ea2e3 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b