CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
x86_assembler.c
Go to the documentation of this file.
1
2/* FUNCTION: __asm_fnstcw */
3
5
6void __asm_fnstcw(void *dest)
7{
8 // the rounding mode is bits 10 and 11 in the control word
9 *(unsigned short *)dest = __CPROVER_rounding_mode << 10;
10}
11
12/* FUNCTION: __asm_fstcw */
13
15
16void __asm_fstcw(void *dest)
17{
18 // the rounding mode is bits 10 and 11 in the control word
19 *(unsigned short *)dest = __CPROVER_rounding_mode << 10;
20}
21
22/* FUNCTION: __asm_fldcw */
23
25
26void __asm_fldcw(void *src)
27{
28 // the rounding mode is bits 10 and 11 in the control word
29 __CPROVER_rounding_mode = ((*(const unsigned short *)src) >> 10) & 3;
30}
31
32/* FUNCTION: __asm_mfence */
33
34void __asm_mfence(void)
35{
36 __CPROVER_fence("WWfence", "RRfence", "RWfence", "WRfence");
37}
38
39/* FUNCTION: __asm_sfence */
40
41void __asm_sfence(void)
42{
43 __CPROVER_fence("WWfence", "RRfence", "RWfence", "WRfence");
44}
45
46/* FUNCTION: __asm_lfence */
47
48void __asm_lfence(void)
49{
50 __CPROVER_fence("WWfence", "RRfence", "RWfence", "WRfence");
51}
void __CPROVER_fence(const char *kind,...)
void __asm_fldcw(void *src)
void __asm_fnstcw(void *dest)
void __asm_mfence(void)
void __asm_lfence(void)
int __CPROVER_rounding_mode
void __asm_sfence(void)
void __asm_fstcw(void *dest)