Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Feature request: FPU and XMM registers
brunov21:
Hi
I miss this feature too :)
What is this gdb_commands.h and this line 910 ? I cannot find it on my xubuntu distro for amd64.
Is there any way to plugin ?
Just getting the register window with hexa value of any MMX/XMM register would be so fine for me ! (click menu +...+ "print xmmNN" is tedious)
(an inline assembler with *no* AT&T syntax would be of great value too).
Nice work anyway, guys !
Bye
Indrekis:
gdb_commands.h is a part of CB sources, and in my local copy of sources resist at:
<CB_SVN_COPY>\trunk\src\plugins\debuggergdb\gdb_commands.h
As for the CB, assembler flavour can be changed in Settings -> Compiler and Debugger settings -> Debugger settings -> Choose disassembly flavour (GDB only)
For the gcc compiler, Intel flavour for all following inline asm can be turned on by the statement:
asm(".intel_syntax noprefix\n");
To complie files with such "instruction" one should use -masm=intel option.
For example,
main.cpp:
--- Quote ---int main (void)
{
asm(".intel_syntax noprefix\n");
asm("mov edx,5\n");
}
--- End quote ---
can be compiled by:
--- Quote ---gcc -masm=intel main.cpp -o intel_asm_sample
--- End quote ---
In CB one may set this option in Project -> build options... -> Compiler settings -> Other options -> here add the line "-masm=intel" .
brunov21:
:shock: Great ! Both work, console and CB :D
(no need for '\n')
asm(".intel_syntax noprefix");
asm("mov edx,5");
asm("psadbw xmm0,xmm15");
asm("pavgb xmm0,xmm8");
Many thanks :D
[sad]
however there is a drawback: the code below is *not* valid with the option -masm=intel :(
unsigned long long foo=0;
int main (void)
{
foo=0x123456789abcdef;
...
I'll have to search through gcc 4.1.3 options
[/sad]
Indrekis:
You are welcome :)
'\n' was necessary for me. Without it next asm statement (either my own or generated by compiler) appears at the same line, leading to errors in the assembly stage. Though that '\n' was annoying.
(It was under gcc-MinGW-3.4.4)
haduken:
If when the processor performs an arithmetic operation on the data in an XMM register maybe i could not use as the feature request.
_________________
Stereolithography
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version