aboutsummaryrefslogtreecommitdiff
path: root/acid
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-23 22:51:28 +0000
committerrsc <devnull@localhost>2005-01-23 22:51:28 +0000
commit95f5b525d2eecb5ea90a056cff47f3bf946540aa (patch)
treeb668945b8d1ae694a91878e51892b9dfe9c7f0ab /acid
parent4a727cddffde2f877ddfb5a5514411c86f35140a (diff)
downloadplan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.tar.gz
plan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.tar.bz2
plan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.zip
changes mainly for threading support
Diffstat (limited to 'acid')
-rw-r--r--acid/port72
1 files changed, 72 insertions, 0 deletions
diff --git a/acid/port b/acid/port
index 1e494530..4e2741d1 100644
--- a/acid/port
+++ b/acid/port
@@ -408,6 +408,29 @@ defn casm()
asm(lasmaddr);
}
+defn xasm(addr)
+{
+ local bound;
+
+ bound = fnbound(addr);
+
+ addr = fmt(addr, 'i');
+ loop 1,_asmlines do {
+ print(fmt(addr, 'a'), " ", fmt(addr, 'X'));
+ print("\t", *addr++, "\n");
+ if bound != {} && addr > bound[1] then {
+ lasmaddr = addr;
+ return {};
+ }
+ }
+ lasmaddr = addr;
+}
+
+defn xcasm()
+{
+ xasm(lasmaddr);
+}
+
defn win()
{
local npid, estr;
@@ -614,5 +637,54 @@ defn acidtypes()
}
}
+defn getregs()
+{
+ local regs, l;
+
+ regs = {};
+ l = registers;
+ while l != {} do {
+ regs = append regs, var(l[0]);
+ l = tail l;
+ }
+ return regs;
+}
+
+defn setregs(regs)
+{
+ local l;
+
+ l = registers;
+ while l != {} do {
+ var(l[0]) = regs[0];
+ l = tail l;
+ regs = tail regs;
+ }
+ return regs;
+}
+
+defn resetregs()
+{
+ local l;
+
+ l = registers;
+ while l != {} do {
+ var(l[0]) = register(l[0]);
+ l = tail l;
+ }
+}
+
+defn clearregs()
+{
+ local l;
+
+ l = registers;
+ while l != {} do {
+ var(l[0]) = refconst(~0);
+ l = tail l;
+ }
+}
+
progargs="";
print(acidfile);
+