Skip to content

Public Target Interface

Core Builtins

Header: <bedrockcoreintrin.h>

Core Intrinsics

Name C interface Lowering Availability, constraint, and effect
breakpoint void(void) BKPT Any privilege; always raises the architectural breakpoint/debug exception.
cpuid u64(u64) CPUID User allowed; reads discovery state and not C memory.
rdpmc u64(performance_counter) RDPMC Unprivileged; ID is a constant in 0 through 65535; zero and unavailable IDs fault with INVALID_SELECTOR.
read_status u16(void) RDSTATUS Unprivileged; reads STATUS and not C memory.
relax void(void) RELAX Unprivileged PAUSE-like convergent hint; retires normally and permits a finite implementation-selected delay, including zero, before subsequent execution.
trace void(u32) TRACE Unprivileged; marker is a constant in 0 through 65535; emits a marker when enabled and otherwise acts as a NOP.
yield void(void) YIELD Any privilege; scheduling hint, not a compiler or memory barrier.

Memory Builtins

Header: <bedrockmemoryintrin.h>

Memory Intrinsics

Name C interface Lowering Availability, constraint, and effect
address_fence void(void) AFENCE Full compiler memory clobber and hardware address fence.
nontemporal_store_u16 void(u16 *,u16) MOVNT.W One writable 16-bit object; one hinted store, neither volatile nor a fence.
nontemporal_store_u32 void(u32 *,u32) MOVNT.L One writable 32-bit object; one hinted store, neither volatile nor a fence.
nontemporal_store_u64 void(u64 *,u64) MOVNT.Q One writable 64-bit object; one hinted store, neither volatile nor a fence.
nontemporal_store_u8 void(u8 *,u8) MOVNT.B One writable byte; one hinted store, neither volatile nor a fence.
read_fence void(void) RFENCE Compiler and hardware read-ordering barrier.
write_fence void(void) WFENCE Compiler and hardware write-ordering barrier.

Integer Builtins

Header: <bedrockintegerintrin.h>

Integer Intrinsics

Name C interface Lowering Availability, constraint, and effect
clmul_u16 u16(u16,u16) CLMUL.W Pure; low 16 bits of the carryless product.
clmul_u32 u32(u32,u32) CLMUL.L Pure; low 32 bits of the carryless product.
clmul_u64 u64(u64,u64) CLMUL.Q Pure; low 64 bits of the carryless product.
clmul_u8 u8(u8,u8) CLMUL.B Pure; low 8 bits of the carryless product.

Floating-Point Builtins

Header: <bedrockfpuintrin.h>

Floating-Point Intrinsics

Name C interface Lowering Availability, constraint, and effect
facosa_f32 float(float) FACOSA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
facosa_f64 double(double) FACOSA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fasina_f32 float(float) FASINA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fasina_f64 double(double) FASINA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fatana_f32 float(float) FATANA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fatana_f64 double(double) FATANA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fatanha_f32 float(float) FATANHA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fatanha_f64 double(double) FATANHA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fclass_f32 u16(float) FCLASS.S FPU required; pure ten-class one-hot classification; does not update FFLAGS.
fclass_f64 u16(double) FCLASS.D FPU required; pure ten-class one-hot classification; does not update FFLAGS.
fcosa_f32 float(float) FCOSA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fcosa_f64 double(double) FCOSA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fcosha_f32 float(float) FCOSHA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fcosha_f64 double(double) FCOSHA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fetoxa_f32 float(float) FETOXA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fetoxa_f64 double(double) FETOXA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fetoxm1a_f32 float(float) FETOXM1A.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fetoxm1a_f64 double(double) FETOXM1A.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flog10a_f32 float(float) FLOG10A.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flog10a_f64 double(double) FLOG10A.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flog2a_f32 float(float) FLOG2A.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flog2a_f64 double(double) FLOG2A.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flogna_f32 float(float) FLOGNA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flogna_f64 double(double) FLOGNA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flognp1a_f32 float(float) FLOGNP1A.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
flognp1a_f64 double(double) FLOGNP1A.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fsina_f32 float(float) FSINA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fsina_f64 double(double) FSINA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fsincosa_f32 void(float,float *,float *) FSINCOSA.S FP and FPTRANSA required; writes sine through the first result pointer and cosine through the second; ISA accuracy, special-value, and floating-point event contracts apply to both results.
fsincosa_f64 void(double,double *,double *) FSINCOSA.D FP and FPTRANSA required; writes sine through the first result pointer and cosine through the second; ISA accuracy, special-value, and floating-point event contracts apply to both results.
fsinha_f32 float(float) FSINHA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
fsinha_f64 double(double) FSINHA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftana_f32 float(float) FTANA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftana_f64 double(double) FTANA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftanha_f32 float(float) FTANHA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftanha_f64 double(double) FTANHA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftentoxa_f32 float(float) FTENTOXA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftentoxa_f64 double(double) FTENTOXA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftwotoxa_f32 float(float) FTWOTOXA.S FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
ftwotoxa_f64 double(double) FTWOTOXA.D FP and FPTRANSA required; ISA accuracy, special-value, and floating-point event contracts apply.
read_fflags u16(void) RDFFLAGS Unprivileged; reads accrued floating-point exception flags.
read_fstatus u16(void) RDFSTATUS Unprivileged; access to the floating-point environment.
write_fflags void(u16) WRFFLAGS Unprivileged; reserved bits follow the ISA; writes accrued flags.
write_fstatus void(u16) WRFSTATUS Unprivileged; reserved bits follow the ISA; changes the floating-point environment.

Approximate Transcendental Lowering Policy

A strict language-library operation shall not be lowered to an FPTRANSA instruction. A compiler may select FPTRANSA only when the source uses a separately defined approximate interface or an active compiler mode permits approximate mathematics. The selected instruction remains subject to its ISA accuracy, special-value, and floating-point exception-condition contract.