KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
sq.h File Reference

Functions to access the SH4 Store Queues. More...

#include <sys/cdefs.h>
#include <stdint.h>
#include <arch/types.h>
#include <arch/memory.h>
#include <arch/cache.h>

Go to the source code of this file.

Macros

#define SQ_MASK_DEST_ADDR(dest)    (MEM_AREA_SQ_BASE | ((uintptr_t)(dest) & 0x03ffffe0))
 Mask dest to Store Queue area as address.
 
#define SQ_MASK_DEST(dest)    ((uint32_t *)(void *) SQ_MASK_DEST_ADDR(dest))
 Mask dest to Store Queue area as pointer.
 
#define sq_flush(dest)   dcache_wback_sq(dest)
 Write-back one Store Queue.
 

Functions

void sq_lock (void *dest)
 Lock Store Queues.
 
void sq_unlock (void)
 Unlock Store Queues.
 
void sq_wait (void)
 Wait for both Store Queues to complete.
 
void * sq_cpy (void *dest, const void *src, size_t n)
 Copy a block of memory.
 
void * sq_fast_cpy (void *dest, const void *src, size_t n)
 Copy a block of memory.
 
void * sq_set (void *dest, uint32_t c, size_t n)
 Set a block of memory to an 8-bit value.
 
void * sq_set16 (void *dest, uint32_t c, size_t n)
 Set a block of memory to a 16-bit value.
 
void * sq_set32 (void *dest, uint32_t c, size_t n)
 Set a block of memory to a 32-bit value.
 
void sq_clr (void *dest, size_t n)
 Clear a block of memory.
 

Detailed Description

Functions to access the SH4 Store Queues.

Author
Andrew Kieschnick
Falco Girgis
Andy Barajas
Ruslan Rostovtsev