-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s390x: update to upstream revision 7e9113cb7 #25
Conversation
94d63e3: Add a mechanism for hinting to the core disassembler loop
efa1e5e: VEX register allocator version 3
83cabd3: Refactor tracking of MOV coalescing
f1a49ee: s390x: z13 vector "support" instructions not implemented
d44563c: s390x: new non-vector z13 instructions not implemented
20976f43: s390x: Implement conditional trap instructions
1cc1d564: s390x: Vector integer and string instruction support
- Update genoffsets
In the long term, rather than cherry picking commits, what about rebasing
on the latest valgrind? Probably out of scope for this PR, but it's
something that we should tackle in the near future...
…On Sun, Mar 17, 2019 at 8:18 AM mephi42 ***@***.***> wrote:
The old endianness patch has finally went upstream, and so I can now
import all the sweet modern s390x insns. There are a bunch of pre-req
changes in the common VEX code that need to be picked as well, but as far
as I can tell they don't negatively affect other architectures.
In order for the whole thing to work, archinfo and pyvex need to be
adapted. I will post the corresponding pull requests shortly.
------------------------------
You can view, comment on, or merge this pull request online at:
#25
Commit Summary
- Pick common code changes from 94d63e3
- Pick common code changes from 20976f43
- Pick common code changes from 1cc1d564
- Pick common code changes from f1a49ee
- Pick common code changes from d44563c
- Port common code changes from efa1e5e
- Port common code changes from 83cabd3
- s390x: update to upstream revision 7e9113cb7
File Changes
- *M* auxprogs/genoffsets.c
<https://github.com/angr/vex/pull/25/files#diff-0> (48)
- *M* common.mk <https://github.com/angr/vex/pull/25/files#diff-1> (1)
- *M* priv/guest_amd64_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-2> (9)
- *M* priv/guest_arm64_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-3> (1)
- *M* priv/guest_arm_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-4> (2)
- *M* priv/guest_generic_bb_to_IR.c
<https://github.com/angr/vex/pull/25/files#diff-5> (28)
- *M* priv/guest_generic_bb_to_IR.h
<https://github.com/angr/vex/pull/25/files#diff-6> (11)
- *M* priv/guest_mips_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-7> (1)
- *M* priv/guest_ppc_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-8> (2)
- *M* priv/guest_s390_defs.h
<https://github.com/angr/vex/pull/25/files#diff-9> (83)
- *M* priv/guest_s390_helpers.c
<https://github.com/angr/vex/pull/25/files#diff-10> (368)
- *M* priv/guest_s390_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-11> (8044)
- *M* priv/guest_tilegx_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-12> (1)
- *M* priv/guest_x86_toIR.c
<https://github.com/angr/vex/pull/25/files#diff-13> (1)
- *M* priv/host_amd64_defs.c
<https://github.com/angr/vex/pull/25/files#diff-14> (98)
- *M* priv/host_amd64_defs.h
<https://github.com/angr/vex/pull/25/files#diff-15> (30)
- *M* priv/host_arm64_defs.c
<https://github.com/angr/vex/pull/25/files#diff-16> (81)
- *M* priv/host_arm64_defs.h
<https://github.com/angr/vex/pull/25/files#diff-17> (4)
- *M* priv/host_arm_defs.c
<https://github.com/angr/vex/pull/25/files#diff-18> (112)
- *M* priv/host_arm_defs.h
<https://github.com/angr/vex/pull/25/files#diff-19> (4)
- *M* priv/host_generic_reg_alloc2.c
<https://github.com/angr/vex/pull/25/files#diff-20> (193)
- *A* priv/host_generic_reg_alloc3.c
<https://github.com/angr/vex/pull/25/files#diff-21> (1373)
- *M* priv/host_generic_regs.c
<https://github.com/angr/vex/pull/25/files#diff-22> (52)
- *M* priv/host_generic_regs.h
<https://github.com/angr/vex/pull/25/files#diff-23> (121)
- *M* priv/host_mips_defs.c
<https://github.com/angr/vex/pull/25/files#diff-24> (70)
- *M* priv/host_mips_defs.h
<https://github.com/angr/vex/pull/25/files#diff-25> (4)
- *M* priv/host_ppc_defs.c
<https://github.com/angr/vex/pull/25/files#diff-26> (83)
- *M* priv/host_ppc_defs.h
<https://github.com/angr/vex/pull/25/files#diff-27> (4)
- *M* priv/host_s390_defs.c
<https://github.com/angr/vex/pull/25/files#diff-28> (1769)
- *M* priv/host_s390_defs.h
<https://github.com/angr/vex/pull/25/files#diff-29> (143)
- *M* priv/host_s390_isel.c
<https://github.com/angr/vex/pull/25/files#diff-30> (1288)
- *M* priv/host_x86_defs.c
<https://github.com/angr/vex/pull/25/files#diff-31> (89)
- *M* priv/host_x86_defs.h
<https://github.com/angr/vex/pull/25/files#diff-32> (5)
- *M* priv/ir_defs.c
<https://github.com/angr/vex/pull/25/files#diff-33> (44)
- *M* priv/main_main.c
<https://github.com/angr/vex/pull/25/files#diff-34> (68)
- *M* priv/main_util.c
<https://github.com/angr/vex/pull/25/files#diff-35> (37)
- *M* priv/s390_defs.h
<https://github.com/angr/vex/pull/25/files#diff-36> (24)
- *M* priv/s390_disasm.c
<https://github.com/angr/vex/pull/25/files#diff-37> (82)
- *M* priv/s390_disasm.h
<https://github.com/angr/vex/pull/25/files#diff-38> (18)
- *M* pub/libvex.h <https://github.com/angr/vex/pull/25/files#diff-39>
(12)
- *M* pub/libvex_emnote.h
<https://github.com/angr/vex/pull/25/files#diff-40> (6)
- *M* pub/libvex_guest_s390x.h
<https://github.com/angr/vex/pull/25/files#diff-41> (132)
- *M* pub/libvex_ir.h
<https://github.com/angr/vex/pull/25/files#diff-42> (28)
- *M* pub/libvex_s390x_common.h
<https://github.com/angr/vex/pull/25/files#diff-43> (7)
- *M* pub/libvex_trc_values.h
<https://github.com/angr/vex/pull/25/files#diff-44> (1)
- *M* useful/test_main.c
<https://github.com/angr/vex/pull/25/files#diff-45> (21)
Patch Links:
- https://github.com/angr/vex/pull/25.patch
- https://github.com/angr/vex/pull/25.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#25>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADSzl03lFsjSiXK6_j8XixX7ttY1GVr-ks5vXYnagaJpZM4b4Gc2>
.
|
I agree that rebasing approach would be nicer, since it would make updates like this one trivial. I have actually tried doing it when adding the initial s390x support, but ran into considerable amount of merge conflicts. If memory serves me right, one of the bigger sources was msvc support. Maybe it might be worth contributing upstream anyway? |
MSVC would be awesome to upstream, but given that the valgrind people mostly view VEX as a valgrind tool, and Windows isn't a target for them, they might not take the patches. Worth a shot, though. @twizmwazin, this one is a doozie, but could you look into rebasing our current VEX changes on modern valgrind? This might be quite a project, but let's at least keep it in mind. |
Here's what julian said re: the msvc patch when I submitted them originally back in 2017:
The problem with rebasing at this point is that the valgrind and vex repos have been merged. There might be some git wizardry we can do to mirror only a subset of a repo, but like, yikes. The main thing that was asked when we did the first round of upstreaming was that we needed tests, and proof that it won't break valgrind. I do have a test harness for how to add vex-only tests to modern valgrind, so whoever wants to do this should ping me for that. We'll need to port our pyvex tests to C, but that's it. |
I think I would like to merge this as is now and deal with rebasing later. @mephi42, can you run the angr/pyvex/claripy/cle tests manually? I don't trust our CI system to build vex... We can deal with the bad git repo situation the same way we did when it was svn: we just copy the base code wholesale and call it an initial commit. |
@rhelmot I am looking into rebasing, there are a few changes there. First, it is now in one repo with the rest of valgrind. One of the consequences of this is that the build system is more integrated, and I am unsure to what extent they support building just the vex library. For a long term solution, dumping the subtree here doesn't make much sense, we will end up back in the same place. Instead, it is probably best to just have a fork of the valgrind repo with the necessary build system changes and patches that can be fairly easily rebased on a regular basis, like after each upstream stable release. Additionally, for the purpose of making our lives easier, it would be in out best interest to regularly see how much can be upstreamed, to keep our patch est minimal. None of this really interferes with this PR being merged, just something to think about on the side. |
here is my fork of valgrind with progress on being able to build and test vex standalone. |
I managed to run the tests as follows (
I ran into the following errors in various tests, all of which appear to be pre-existing:
Overall stats:
|
I made another update (on top of existing ones for simplicity), which brings support for several z14 instructions. |
I've rebased the code and pushed it to #26 (didn't want to split this time, so I'll close this PR). I've also rebased the associated archinfo and pyvex PRs: angr/archinfo#61 Could you have a look please? |
The old endianness patch has finally went upstream, and so I can now import all the sweet modern s390x insns. There are a bunch of pre-req changes in the common VEX code that need to be picked as well, but as far as I can tell they don't negatively affect other architectures.
In order for the whole thing to work, archinfo and pyvex need to be adapted. I will post the corresponding pull requests shortly.