Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions src/netdev/netdev_dtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ extern struct ExecBase *SysBase;
static APTR dt_base;

/*
* The eleven entry points, called by offset. Behind a seam: the host test
* The eleven entry points, called by offset. Each may destroy d0/d1/a0/a1,
* so an argument register is a "+r" operand, never an input alone (#70).
* Behind a seam: the host test
* (src/netdev/test/test_netdev_dtree.c) supplies the same eleven over a tree
* it builds in memory, which is how the ranges arithmetic and the cell counts
* are checked without an Emu68.
Expand All @@ -48,7 +50,7 @@ static APTR dt_openkey(const char *name)
register APTR d0 __asm("d0");

__asm volatile ("jsr a6@(-6:W)"
: "=r" (d0) : "r" (a6), "r" (a0)
: "=r" (d0), "+r" (a0) : "r" (a6)
: "cc", "memory", "d1", "a1");
return d0;
}
Expand All @@ -59,7 +61,7 @@ static VOID dt_closekey(APTR key)
register APTR a6 __asm("a6") = dt_base;

__asm volatile ("jsr a6@(-12:W)"
: : "r" (a6), "r" (a0)
: "+r" (a0) : "r" (a6)
: "cc", "memory", "d0", "d1", "a1");
}

Expand All @@ -71,7 +73,7 @@ static APTR dt_getchild(APTR key, APTR prev)
register APTR d0 __asm("d0");

__asm volatile ("jsr a6@(-18:W)"
: "=r" (d0) : "r" (a6), "r" (a0), "r" (a1)
: "=r" (d0), "+r" (a0), "+r" (a1) : "r" (a6)
: "cc", "memory", "d1");
return d0;
}
Expand All @@ -84,7 +86,7 @@ static APTR dt_findprop(APTR key, const char *name)
register APTR d0 __asm("d0");

__asm volatile ("jsr a6@(-24:W)"
: "=r" (d0) : "r" (a6), "r" (a0), "r" (a1)
: "=r" (d0), "+r" (a0), "+r" (a1) : "r" (a6)
: "cc", "memory", "d1");
return d0;
}
Expand All @@ -96,7 +98,7 @@ static ULONG dt_proplen(APTR prop)
register ULONG d0 __asm("d0");

__asm volatile ("jsr a6@(-36:W)"
: "=r" (d0) : "r" (a6), "r" (a0)
: "=r" (d0), "+r" (a0) : "r" (a6)
: "cc", "memory", "d1", "a1");
return d0;
}
Expand All @@ -108,7 +110,7 @@ static const UBYTE *dt_propvalue(APTR prop)
register const UBYTE *d0 __asm("d0");

__asm volatile ("jsr a6@(-48:W)"
: "=r" (d0) : "r" (a6), "r" (a0)
: "=r" (d0), "+r" (a0) : "r" (a6)
: "cc", "memory", "d1", "a1");
return d0;
}
Expand All @@ -120,7 +122,7 @@ static APTR dt_getparent(APTR key)
register APTR d0 __asm("d0");

__asm volatile ("jsr a6@(-54:W)"
: "=r" (d0) : "r" (a6), "r" (a0)
: "=r" (d0), "+r" (a0) : "r" (a6)
: "cc", "memory", "d1", "a1");
return d0;
}
Expand All @@ -132,7 +134,7 @@ static const char *dt_keyname(APTR key)
register const char *d0 __asm("d0");

__asm volatile ("jsr a6@(-60:W)"
: "=r" (d0) : "r" (a6), "r" (a0)
: "=r" (d0), "+r" (a0) : "r" (a6)
: "cc", "memory", "d1", "a1");
return d0;
}
Expand Down
Loading