Comments (5)
I was thinking about having a class SegmentReg : class Reg
type for the members cs
,ds
,ss
,es
,fs
,gs
and extending RegExp
to allow following expressions:
(ptr|dword|word|byte) [(cs|ds|ss|es|fs|gs) | base + index * (1|2|4|8) + displacement]
Such that, for example, following expressions were possible:
mov(ecx, ptr[rax]);
mov(ecx, ptr[fs | rax]);
mov(ebx, ptr[gs | rax + rcx*4]);
mov(fs, rax);
This matches more or less the Intel syntax.
from xbyak.
Thank you for your suggestion, but it is difficult to extend Addressing to support segment registers.
How about the following extension?
add method cs(), ds(), ... to Xbyak::CodeGenerator;
cs() { db(0x2e); }
ds() { db(0x3e); }
...
mov(ecx, ptr[rax]);
fs(); mov(ecx, ptr[rax]);
gs(); mov(ebx, ptr[rax + rcx*4]);
It is necessary for mov
to support segment registers.
from xbyak.
True, that's a simpler workaround. I guess I will do that (for now). Thanks for the tip! :-)
from xbyak.
https://github.com/herumi/xbyak/releases/tag/v4.87 supports the following codes.
putSeg(fs); mov(eax, ptr [ecx]);
mov(cs, ax);
push(ds);
Could you try it?
from xbyak.
I've tried it and it works perfectly. Thank you very much for your support and congratulations for this great library. I'm closing this issue. :-)
from xbyak.
Related Issues (20)
- array-bounds error HOT 10
- Broken test suite on x86 (IA-32) HOT 2
- WAITPKG HOT 2
- Build failure with XBYAK_NO_EXCEPTION HOT 2
- Cpu::has() check is inconsistent HOT 3
- The version number went backwards: 6.052 -> 6.06 HOT 10
- Compilation issue with template trick on MSVC HOT 3
- Standalone CPUID flags are coupled with `AVX512F` HOT 1
- movzx eax, ah HOT 3
- "invalid token at start of a preprocessor expression" HOT 5
- Question on error stickyness HOT 3
- Error raised when using vpmovsdb with memory mask HOT 4
- x32 support HOT 11
- Please use ${CXX} instead of hardcoding g++ because in different systems C++ compiler has different executable names HOT 2
- RISC-V ISA support HOT 2
- aligned allocation requests should be rounded up to page size HOT 2
- AMD MONITORX instructions support HOT 2
- Support for Intel APX and AVX10 HOT 4
- Support for xbegin, xend, xabort functions HOT 1
- APX support in progress HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xbyak.