summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@ppcg5.localdomain>2007-12-02 13:43:51 +1100
committerroot <root@ppcg5.localdomain>2007-12-02 13:43:51 +1100
commit747711ab3442fc7ed65137cba391af6a244d899f (patch)
tree2f57c4aa00445f92f0b6eb000f6160616e938099
parentb1a91e805837ac5841460c279775eebebdeca92e (diff)
add regmatch for 0x regs
-rw-r--r--radeontool.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/radeontool.c b/radeontool.c
index 5bc8cc5..d0b10d3 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -346,6 +346,15 @@ static struct {
void radeon_reg_match(const char *pattern)
{
int i;
+ unsigned long address;
+ unsigned int value;
+ if (pattern[0] == '0' && pattern[1] == 'x') {
+ address = strtol(&(pattern[2]), NULL, 16);
+ value = radeon_get32(address, pattern);
+ printf("%s\t0x%08x (%d)\n", pattern, value, value);
+ return;
+ }
+
for (i=0;i<sizeof(reg_list)/sizeof(reg_list[0]);i++) {
if (fnmatch(pattern, reg_list[i].name, 0) == 0) {
printf("%s (%04x)\t0x%08x\n",