diff options
author | rsc <devnull@localhost> | 2005-01-23 22:51:28 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-23 22:51:28 +0000 |
commit | 95f5b525d2eecb5ea90a056cff47f3bf946540aa (patch) | |
tree | b668945b8d1ae694a91878e51892b9dfe9c7f0ab /acid/port | |
parent | 4a727cddffde2f877ddfb5a5514411c86f35140a (diff) | |
download | plan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.tar.gz plan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.tar.bz2 plan9port-95f5b525d2eecb5ea90a056cff47f3bf946540aa.zip |
changes mainly for threading support
Diffstat (limited to 'acid/port')
-rw-r--r-- | acid/port | 72 |
1 files changed, 72 insertions, 0 deletions
@@ -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); + |