arch/m68k/fpsp040/x_snan.S

Source file repositories/reference/linux-study-clean/arch/m68k/fpsp040/x_snan.S

File Facts

System
Linux kernel
Corpus path
arch/m68k/fpsp040/x_snan.S
Extension
.S
Size
6621 bytes
Lines
277
Domain
Architecture Layer
Bucket
arch/m68k
Inferred role
Architecture Layer: arch/m68k
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

bfextu		CMDREG1B(%a6){#3:#3},%d0 |move rx field to d0{2:0}
	cmpil		#0,%d0		|check for long
	beqs		sto_long	|branch if move_out long

	cmpil		#4,%d0		|check for word
	beqs		sto_word	|branch if move_out word

	cmpil		#6,%d0		|check for byte
	beqs		sto_byte	|branch if move_out byte

|
| Not byte, word or long
|
	rts
|
| Get the 32 most significant bits of etemp mantissa
|
sto_long:
	movel		ETEMP_HI(%a6),%d1
	movel		#4,%d0		|load byte count
|
| Set signalling nan bit
|
	bsetl		#30,%d1
|
| Store to the users destination address
|
	tstl		%a0		|check if <ea> is 0
	beqs		wrt_dn		|destination is a data register

	movel		%d1,-(%a7)	|move the snan onto the stack
	movel		%a0,%a1		|load dest addr into a1
	movel		%a7,%a0		|load src addr of snan into a0
	bsrl		mem_write	|write snan to user memory
	movel		(%a7)+,%d1	|clear off stack
	rts
|
| Get the 16 most significant bits of etemp mantissa
|
sto_word:
	movel		ETEMP_HI(%a6),%d1
	movel		#2,%d0		|load byte count
|
| Set signalling nan bit
|
	bsetl		#30,%d1
|
| Store to the users destination address
|
	tstl		%a0		|check if <ea> is 0
	beqs		wrt_dn		|destination is a data register

	movel		%d1,-(%a7)	|move the snan onto the stack
	movel		%a0,%a1		|load dest addr into a1
	movel		%a7,%a0		|point to low word
	bsrl		mem_write	|write snan to user memory
	movel		(%a7)+,%d1	|clear off stack
	rts
|
| Get the 8 most significant bits of etemp mantissa
|
sto_byte:
	movel		ETEMP_HI(%a6),%d1
	movel		#1,%d0		|load byte count
|
| Set signalling nan bit
|
	bsetl		#30,%d1
|
| Store to the users destination address

Annotation

Implementation Notes