Displaying 3 results from an estimated 3 matches for "nmy_hook_fcn".
Did you mean:
my_hook_fcn
2019 Feb 12
2
[RFC] Potential extension to asm statement functionality
...<stdint.h>
uint32_t f(uint32_t x);
uint32_t g(uint32_t x);
uint32_t f(uint32_t x) {
uint32_t returnValue = g(x);
if (returnValue > 0U) {
returnValue = 0x40000000;
}
else {
returnValue = 0x80000000;
}
__asm __volatile__ ("\t.global my_hook_fcn\nmy_hook_fcn:\n");
return returnValue;
}
uint32_t g(uint32_t x) {
return x >> 1U;
}
If the above definition of f() is compiled with optimization at level 1 or higher, the TailDuplication optimization pass will duplicate and move the asm statement and return up into the if block and the else...
2019 Feb 12
3
[RFC] Potential extension to asm statement functionality
...<stdint.h>
uint32_t f(uint32_t x);
uint32_t g(uint32_t x);
uint32_t f(uint32_t x) {
uint32_t returnValue = g(x);
if (returnValue > 0U) {
returnValue = 0x40000000;
}
else {
returnValue = 0x80000000;
}
__asm __volatile__ ("\t.global my_hook_fcn\nmy_hook_fcn:\n");
return returnValue;
}
uint32_t g(uint32_t x) {
return x >> 1U;
}
If the above definition of f() is compiled with optimization at level 1 or higher, the TailDuplication optimization pass will duplicate and move the asm statement and return up into the if block and the else...
2019 Feb 14
3
[RFC] Potential extension to asm statement functionality
...<stdint.h>
uint32_t f(uint32_t x);
uint32_t g(uint32_t x);
uint32_t f(uint32_t x) {
uint32_t returnValue = g(x);
if (returnValue > 0U) {
returnValue = 0x40000000;
}
else {
returnValue = 0x80000000;
}
__asm __volatile__ ("\t.global my_hook_fcn\nmy_hook_fcn:\n");
return returnValue;
}
uint32_t g(uint32_t x) {
return x >> 1U;
}
If the above definition of f() is compiled with optimization at level 1 or higher, the TailDuplication optimization pass will duplicate and move the asm statement and return up into the if block and the else...