GithubHelp home page GithubHelp logo

Comments (6)

herumi avatar herumi commented on May 22, 2024

Thank you for your code. I'll check it.

from xbyak.

herumi avatar herumi commented on May 22, 2024

Thank you for your excellent code.
I merged and modifed your code a little.
2158b53

You can write as the following code.
Is this your desired specification?

Label label1, label2;
jmp("@f");
L(label1);
  db(a0, 4);
  db(a1, 4);
L("@@");
  mov(eax, ptr [rip + label1]);       // a0
  add(eax, ptr [rip + label1+4]);     // a1
  add(eax, ptr [rip + label2-8+2+6]); // b0
  add(eax, ptr [rip + 16+label2-12]); // b1
  ret();
L(label2);
  db(b0, 4);
  db(b1, 4);

from xbyak.

whyisthisfieldhere avatar whyisthisfieldhere commented on May 22, 2024

Thank you very much for merging and improving my changes, this is indeed the specification I was hoping for.

Testing it on my project, I found a bug with the modified changes, though:

The following code:
pshufb (xmm2, ptr[rip+myLabel]);
Generates the following instruction:
pshufb xmm0,
(The bug is that xmm2 became xmm0)

This happens because the new code always outputs 0x05 for rip-relative addresses with a label, even if updateRegField was called on the address.

from xbyak.

herumi avatar herumi commented on May 22, 2024

I'm sorry. I fixed it. c81d6d8
Could you try it again?

from xbyak.

whyisthisfieldhere avatar whyisthisfieldhere commented on May 22, 2024

Thanks, herumi!
I've tested the updated branch and it works great with my project.

from xbyak.

herumi avatar herumi commented on May 22, 2024

Thank you for the confirmation.

from xbyak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.