Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ version at the top when it merges.

## Unreleased

- `anxnet.device` on a PC Card slot records the correct I/O mode in its diagnostic record.
- The installer can set the clock from an Internet time server at boot; the answer defaults to no.
- `SO_REUSEPORT` on a UDP socket now shares the port instead of being ignored,
and `SO_REUSEADDR` opts into the same sharing for callers that know only that
Expand Down
24 changes: 13 additions & 11 deletions src/netdev/netdev_pcmcia.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ struct Library *CardResource;
/*
* card.resource stubs: no proto header works on both toolchains. LVOs:
* OwnCard -0x06(a1), ReleaseCard -0x0c(a1,d0), CardMiscControl -0x30(a1,d1),
* CopyTuple -0x48(a1,a0,d1,d0).
* CopyTuple -0x48(a1,a0,d1,d0). Every one may destroy d0/d1/a0/a1, so each
* of those is an output ("+r" when it also carries an argument) or a clobber;
* an argument register listed only as an input was reused stale (#70).
*/

static struct CardHandle *pc_own_card(struct CardHandle *h)
Expand All @@ -36,8 +38,8 @@ static struct CardHandle *pc_own_card(struct CardHandle *h)
register struct CardHandle *res __asm("d0");

__asm __volatile ("jsr a6@(-0x6)"
: "=r" (res)
: "r" (_a6), "r" (_a1)
: "=r" (res), "+r" (_a1)
: "r" (_a6)
: "d1", "a0", "cc", "memory");

return res;
Expand All @@ -50,8 +52,8 @@ static VOID pc_release_card(struct CardHandle *h, ULONG flags)
register ULONG _d0 __asm("d0") = flags;

__asm __volatile ("jsr a6@(-0xc)"
: "+r" (_d0)
: "r" (_a6), "r" (_a1)
: "+r" (_d0), "+r" (_a1)
: "r" (_a6)
: "d1", "a0", "cc", "memory");
}

Expand All @@ -62,8 +64,8 @@ static BOOL pc_reset_card(struct CardHandle *h)
register LONG res __asm("d0");

__asm __volatile ("jsr a6@(-0x42)"
: "=r" (res)
: "r" (_a6), "r" (_a1)
: "=r" (res), "+r" (_a1)
: "r" (_a6)
: "d1", "a0", "cc", "memory");

return (BOOL)(res != 0);
Expand All @@ -77,8 +79,8 @@ static UBYTE pc_misc_control(struct CardHandle *h, UBYTE bits)
register LONG res __asm("d0");

__asm __volatile ("jsr a6@(-0x30)"
: "=r" (res)
: "r" (_a6), "r" (_a1), "r" (_d1)
: "=r" (res), "+r" (_a1), "+r" (_d1)
: "r" (_a6)
: "a0", "cc", "memory");

return (UBYTE)res;
Expand All @@ -95,8 +97,8 @@ static BOOL pc_copy_tuple(struct CardHandle *h, UBYTE *buf, ULONG code,
register LONG res __asm("d0");

__asm __volatile ("jsr a6@(-0x48)"
: "=r" (res)
: "r" (_a6), "r" (_a1), "r" (_a0), "r" (_d1), "0" (_d0)
: "=r" (res), "+r" (_a1), "+r" (_a0), "+r" (_d1)
: "r" (_a6), "0" (_d0)
: "cc", "memory");

return (BOOL)(res != 0);
Expand Down
Loading