Question: Using C Language I've begun a C function that intends to bitwise xor two memory buffers together and write the result to a third buffer
Using C Language
I've begun a C function that intends to bitwise xor two memory buffers together and write the result to a third buffer (ie, the i-th byte of output is the bitwise xor of the i-th bytes of the two inputs). Finish the function using SSE to accellerate the process. If the buffer is not a multiple of 16 bytes long, you will need to complete the xoring in a second loop that xors one byte at a time. Use SSE instrinsics for all SSE loads, stores, and manipulations.
Pseudo code BELOW
while(size is greater than 16)
load sc1 with SSE function to x
load sc2 with SSE function to y
xor x and y with xor SSE function and store into res variable
Use SSE store function to store res into dst
adjust the pointer for dst, sc1, sc2 by 16 bytes
subtract 16 from the sz
after loop xor the remaining bytes from sc1 and sc2 and store them into dst

1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
