mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Programming

Reply
 
Thread Tools
Old 2010-10-18, 21:35   #34
axn
 
axn's Avatar
 
Jun 2003

23·683 Posts
Default

Quote:
Originally Posted by ewmayer View Post
Retina, based on your comment - coupled with the fact that Visual studio does seem to be diligent about not inducing ASM-inlining-related clobbers other than the one the user specifies - I expected to see something like this in the assembler output when I generated it over the weekend:
Code:
add ecx,edi
movaps xmm0,[ecx]
sub ecx,edi
No. Subtraction is what is not supported by x86. Addition is.
axn is offline   Reply With Quote
Old 2010-10-18, 22:36   #35
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

22×2,939 Posts
Default

Quote:
Originally Posted by axn View Post
No. Subtraction is what is not supported by x86. Addition is.
Ah - misread your note the first time around ... and a little more diggong resolves the mystery...

Note that I only actually use the + (register-add) form in my functional macros. After getting those working to make sure the [ecx+edi] - style addressing format worked, I wrote a simple one-line test macro to see if the minus form also worked. That compiled without complaint, so I assumed it did.

When I look at the assembler output and search for the minus-form test macro, it does not appear, apparently since it is not used. When I actually inlined it in some code just now, I did in fact get a compile error:

error C2425: '-' : non-constant expression in 'second operand'

So one would in fact need to do an explicit negation to effect such an address computation. Analogously, when I try to inline a non-power-of-2 scale factor like [ecx+5*edi], the compiler gives

error C2423: '5' : illegal scale

Last fiddled with by ewmayer on 2010-10-18 at 22:37
ewmayer is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
PauseWhileRunning and running as admin [Win7] ixfd64 Software 8 2016-03-14 01:17
Query - Running GIMPS on a 4 way system Unregistered Hardware 6 2005-07-04 04:27
Torture Test - System running processor very low compared to other systems DougTheSlug Hardware 5 2005-01-27 09:51
Running prime95 and NFSNET together on a HT enabled system TauCeti NFSNET Discussion 1 2003-07-02 16:26
How long has your system been running without a reset? Gary Edstrom Lounge 14 2003-06-28 15:00

All times are UTC. The time now is 04:24.


Fri Jul 7 04:24:20 UTC 2023 up 323 days, 1:52, 0 users, load averages: 1.62, 1.68, 1.56

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔