Fwd: Help to understand instructions
Sergey Ivanov
icegood1980@gmail.com
Wed Nov 7 12:49:00 GMT 2012
Have compiled program with -g O3 together.
Now learn it output via objdump (with code mixed format) and see
(sorry for rather long one, just environment for question):
..........
inline void Box::MinCoordDistance(double &r, const int i) const
{
if (r >= halfL[i])
41f06d: f2 0f 10 48 38 movsd xmm1,QWORD PTR [rax+0x38]
*/
inline double Box::distanceSq(const Vec r1, const Vec r2, Vec dr) const
{
for (int i = 0; i < 3; i++)
{
dr[i] = r1[i] - r2[i];
41f072: f2 41 0f 5c 40 10 subsd xmm0,QWORD PTR [r8+0x10]
return distanceSq(r1, r2, dr);
}
inline void Box::MinCoordDistance(double &r, const int i) const
{
if (r >= halfL[i])
41f078: 66 0f 2e c1 ucomisd xmm0,xmm1
*/
inline double Box::distanceSq(const Vec r1, const Vec r2, Vec dr) const
{
for (int i = 0; i < 3; i++)
{
dr[i] = r1[i] - r2[i];
41f07c: f2 0f 11 44 24 18 movsd QWORD PTR [rsp+0x18],xmm0
return distanceSq(r1, r2, dr);
}
inline void Box::MinCoordDistance(double &r, const int i) const
{
if (r >= halfL[i])
41f082: 0f 83 50 01 00 00 jae 41f1d8
<CbDoubleBridgeBase<EnsembleNVT,
Homopolymer>::scanBridgingForwardOne(int)+0x258>
r -= L[i];
else if (r < -halfL[i])
41f088: f2 0f 10 15 90 55 02 movsd xmm2,QWORD PTR
[rip+0x25590] # 444620 <typeinfo name for
SpeciesDependedMove<GeneralPolymerChain>+0x80> <<<<<<<<<<<<<<<question
is here
41f08f: 00
41f090: 66 0f 57 ca xorpd xmm1,xmm2
41f094: 66 0f 2e c8 ucomisd xmm1,xmm0
41f098: 76 0b jbe 41f0a5
<CbDoubleBridgeBase<EnsembleNVT,
Homopolymer>::scanBridgingForwardOne(int)+0x125>
r += L[i];
41f09a: f2 0f 58 40 20 addsd xmm0,QWORD PTR [rax+0x20]
41f09f: f2 0f 11 44 24 18 movsd QWORD PTR [rsp+0x18],xmm0
*/
inline double Box::distanceSq(const Vec r1, const Vec r2, Vec dr) const
{
for (int i = 0; i < 3; i++)
{
dr[i] = r1[i] - r2[i];
41f0a5: f2 0f 10 47 18 movsd xmm0,QWORD PTR [rdi+0x18]
return distanceSq(r1, r2, dr);
}
inline void Box::MinCoordDistance(double &r, const int i) const
{
if (r >= halfL[i])
41f0aa: f2 0f 10 48 40 movsd xmm1,QWORD PTR [rax+0x40]
*/
inline double Box::distanceSq(const Vec r1, const Vec r2, Vec dr) const
{
for (int i = 0; i < 3; i++)
{
dr[i] = r1[i] - r2[i];
41f0af: f2 41 0f 5c 40 18 subsd xmm0,QWORD PTR [r8+0x18]
return distanceSq(r1, r2, dr);
}
.................
What implicit addressation via rip means? Is it kind of protection or
is it bug of objdump?
--
Kind regards,
Sergey Ivanov
More information about the Gcc-help
mailing list