* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
/* Register test program.
|
|
|
|
|
2014-01-01 03:54:24 +00:00
|
|
|
Copyright 2007-2014 Free Software Foundation, Inc.
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 18:08:50 +00:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 18:08:50 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
read_regs (unsigned long long regs[16], unsigned long control_regs[6])
|
|
|
|
{
|
2007-02-26 19:18:53 +00:00
|
|
|
asm volatile ("wstrd wR0, %0" : "=m" (regs[0]));
|
|
|
|
asm volatile ("wstrd wR1, %0" : "=m" (regs[1]));
|
|
|
|
asm volatile ("wstrd wR2, %0" : "=m" (regs[2]));
|
|
|
|
asm volatile ("wstrd wR3, %0" : "=m" (regs[3]));
|
|
|
|
asm volatile ("wstrd wR4, %0" : "=m" (regs[4]));
|
|
|
|
asm volatile ("wstrd wR5, %0" : "=m" (regs[5]));
|
|
|
|
asm volatile ("wstrd wR6, %0" : "=m" (regs[6]));
|
|
|
|
asm volatile ("wstrd wR7, %0" : "=m" (regs[7]));
|
|
|
|
asm volatile ("wstrd wR8, %0" : "=m" (regs[8]));
|
|
|
|
asm volatile ("wstrd wR9, %0" : "=m" (regs[9]));
|
|
|
|
asm volatile ("wstrd wR10, %0" : "=m" (regs[10]));
|
|
|
|
asm volatile ("wstrd wR11, %0" : "=m" (regs[11]));
|
|
|
|
asm volatile ("wstrd wR12, %0" : "=m" (regs[12]));
|
|
|
|
asm volatile ("wstrd wR13, %0" : "=m" (regs[13]));
|
|
|
|
asm volatile ("wstrd wR14, %0" : "=m" (regs[14]));
|
|
|
|
asm volatile ("wstrd wR15, %0" : "=m" (regs[15]));
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
|
2007-02-26 19:18:53 +00:00
|
|
|
asm volatile ("wstrw wCSSF, %0" : "=m" (control_regs[0]));
|
|
|
|
asm volatile ("wstrw wCASF, %0" : "=m" (control_regs[1]));
|
|
|
|
asm volatile ("wstrw wCGR0, %0" : "=m" (control_regs[2]));
|
|
|
|
asm volatile ("wstrw wCGR1, %0" : "=m" (control_regs[3]));
|
|
|
|
asm volatile ("wstrw wCGR2, %0" : "=m" (control_regs[4]));
|
|
|
|
asm volatile ("wstrw wCGR3, %0" : "=m" (control_regs[5]));
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
write_regs (unsigned long long regs[16], unsigned long control_regs[6])
|
|
|
|
{
|
2007-02-26 19:18:53 +00:00
|
|
|
asm volatile ("wldrd wR0, %0" : : "m" (regs[0]));
|
|
|
|
asm volatile ("wldrd wR1, %0" : : "m" (regs[1]));
|
|
|
|
asm volatile ("wldrd wR2, %0" : : "m" (regs[2]));
|
|
|
|
asm volatile ("wldrd wR3, %0" : : "m" (regs[3]));
|
|
|
|
asm volatile ("wldrd wR4, %0" : : "m" (regs[4]));
|
|
|
|
asm volatile ("wldrd wR5, %0" : : "m" (regs[5]));
|
|
|
|
asm volatile ("wldrd wR6, %0" : : "m" (regs[6]));
|
|
|
|
asm volatile ("wldrd wR7, %0" : : "m" (regs[7]));
|
|
|
|
asm volatile ("wldrd wR8, %0" : : "m" (regs[8]));
|
|
|
|
asm volatile ("wldrd wR9, %0" : : "m" (regs[9]));
|
|
|
|
asm volatile ("wldrd wR10, %0" : : "m" (regs[10]));
|
|
|
|
asm volatile ("wldrd wR11, %0" : : "m" (regs[11]));
|
|
|
|
asm volatile ("wldrd wR12, %0" : : "m" (regs[12]));
|
|
|
|
asm volatile ("wldrd wR13, %0" : : "m" (regs[13]));
|
|
|
|
asm volatile ("wldrd wR14, %0" : : "m" (regs[14]));
|
|
|
|
asm volatile ("wldrd wR15, %0" : : "m" (regs[15]));
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
|
2007-02-26 19:18:53 +00:00
|
|
|
asm volatile ("wldrw wCSSF, %0" : : "m" (control_regs[0]));
|
|
|
|
asm volatile ("wldrw wCASF, %0" : : "m" (control_regs[1]));
|
|
|
|
asm volatile ("wldrw wCGR0, %0" : : "m" (control_regs[2]));
|
|
|
|
asm volatile ("wldrw wCGR1, %0" : : "m" (control_regs[3]));
|
|
|
|
asm volatile ("wldrw wCGR2, %0" : : "m" (control_regs[4]));
|
|
|
|
asm volatile ("wldrw wCGR3, %0" : : "m" (control_regs[5]));
|
* features/Makefile, features/arm-with-iwmmxt.xml,
features/gdbserver-regs.xsl, features/number-regs.xsl,
features/sort-regs.xsl, features/xscale-iwmmxt.xml: New files.
* regformats/arm-with-iwmmxt.dat: Generate.
* NEWS: Mention iWMMXt.
* gdb.arch/iwmmxt-regs.c, gdb.arch/iwmmxt-regs.exp: New.
* Makefile.in (OBS): Add $(XML_BUILTIN).
(XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
(clean): Update.
(target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
(arm-with-iwmmxt.c): New.
* config.in, configure: Regenerate.
* configure.ac: Check for iWMMXt. Handle srv_xmltarget,
srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
* configure.srv: Mention srv_xmltarget and srv_xmlfiles.
(arm*-*-linux*): Add iWMMXt and regset support.
* linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
(arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
(arm_store_wmmxregset, target_regsets): New.
* server.c (get_features_xml): Take annex argument. Check builtin
XML documents.
(handle_query): Handle multiple annexes.
2007-02-08 21:39:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
main ()
|
|
|
|
{
|
|
|
|
unsigned long long regs[16];
|
|
|
|
unsigned long control_regs[6];
|
|
|
|
|
|
|
|
read_regs (regs, control_regs);
|
|
|
|
write_regs (regs, control_regs);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|