Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

inter-procedural TSX

Shu_W_
Beginner
111 Views

Hello all,

I have once question if we can use TSX in inter-procedural situation. For example, could we place x_begin in foo_a() and place x_end in foo_b()? Thanks a lot!

foo_a(){

             ....
            x_begin();
             ....

}

foo_b(){

            foo_a();
             ......
            x_end();



}

 

0 Kudos
1 Reply
andysem
New Contributor III
111 Views

It depends on what instructions are used in the transactional region (in particular, what instructions are used to call the functions). Have a look at section "15.3.8.1 Instruction Based Considerations" of SDM (http://www.intel.com/sdm/). In particular, you can see the following instructions may cause an abort:

- Far CALL, Far JMP, Far RET, IRET

- SYSENTER, SYSCALL, SYSEXIT, and SYSRET

It doesn't list the near CALL or RET (i.e. the call that doesn't qualify a segment register), so with normal userspace functions you should be fine. Note however that CALL and RET modify stack, which is added to the transaction working set and may result in abort in its own right.

 

Reply