Difference between revisions of "Assembler:Commands:ADDPS"
Jump to navigation
Jump to search
(Created page with 'Category:Assembler '''command''' addps ''destination, source'' Adds the source to the destination. Used for Adding Packed Scalar Single-Precision Floating-Point Values. The …') |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
'''command''' addps ''destination, source'' | '''command''' addps ''destination, source'' | ||
− | Adds the source to the destination. Used for Adding Packed | + | Adds the source to the destination. Used for Adding Packed-Single-Precision Floating-Point Values. The addps command can only be used with xmm registers. |
− | |||
− | |||
− | |||
Line 45: | Line 42: | ||
alloc(newmem,$100) | alloc(newmem,$100) | ||
− | + | globalalloc(sse,$10) | |
+ | |||
+ | sse: | ||
+ | dd (float)3000 | ||
+ | dd (float)5000 | ||
+ | ; dd (float)7000 ; can be used upon requirements | ||
+ | ; dd (float)1000 ; can be used upon requirements | ||
; ... | ; ... | ||
newmem: | newmem: | ||
− | addps xmm0,[ | + | addps xmm0,[sse] |
; ... | ; ... | ||
jmp return | jmp return | ||
− | |||
− | |||
− | |||
− | |||
; ... | ; ... | ||
− | + | return: | |
[disable] | [disable] |
Latest revision as of 16:14, 18 January 2018
command addps destination, source
Adds the source to the destination. Used for Adding Packed-Single-Precision Floating-Point Values. The addps command can only be used with xmm registers.
Performs an SIMD add of the four packed single-precision floating-point values from the source operand (second operand) and the destination operand (first operand), and stores the packed single-precision floating-point results in the destination operand. The source operand can be an XMM register or a 128-bit memory location. The destination operand is an XMM register.
Command Parameters[edit]
Parameter | Description |
---|---|
destination | xmm |
source | xmm / m128 |
Examples[edit]
addps xmm0,xmm1
addps xmm3,[edx+110]
addps xmm15,[rdx+10]
addps xmm5,[00123abc]
addps xmm7,[UserDefinedSymbol]
[enable] ; ... alloc(newmem,$100) globalalloc(sse,$10) sse: dd (float)3000 dd (float)5000 ; dd (float)7000 ; can be used upon requirements ; dd (float)1000 ; can be used upon requirements ; ... newmem: addps xmm0,[sse] ; ... jmp return ; ... return: [disable] ; ...