Operating System - HP-UX
1753301 Members
6830 Online
108792 Solutions
New Discussion юеВ

Re: what does these options mean while compiling +DA1.1 and +DS1.1

 
SOLVED
Go to solution
Ski Ride
Advisor

what does these options mean while compiling +DA1.1 and +DS1.1

Hi all

cc +DA1.1 +DS1.1 -o /tmp/testapis /tmp/file.c

While compiling the temp.c file i encounter the above line in my shell script.

I would like to know what the options +DA1.1 and +DS1.1 is used for.

After googling i found that we need to use it on PA RISC machines but a more detailed explanation will be helpful.....
9 REPLIES 9
Matti_Kurkela
Honored Contributor
Solution

Re: what does these options mean while compiling +DA1.1 and +DS1.1

+DA selects the PA-RISC processor type to compile for.

+DA1.1 makes the code most efficient for old 32-bit PA-RISC 1.1 processors. Because these processors are 32-bit only, you cannot use 64-bit code. The code can be run on PA-RISC 2.0 processors too, although it might not be optimized for them.

+DA2.0 generates 32-bit code for the PA-RISC 2.0 architecture (=processors which can run both 32-bit and 64-bit code).

+DA2.0W generates 64-bit code, which can be run on PA-RISC 2.0 processors only.

+DAportable generates code that is compatible across all PA-RISC 1.1 and 2.0 workstation and server processors.

+DS adjusts code optimization in the same way.

You might choose to use +DAportable so that even old, small machines can be used to test your application and the application does not need to be 64-bit.

If you think the application will mostly be in production use in modern 64-bit-capable servers, you might specify "+DAportable +DS2.0", so that the program will be as efficient as possible when it is running on a big production server.

If you think the application will mostly be used on machines with old 32-bit processors, "+DAportable +DS1.1" or "+DA1.1 +DS1.1" will optimize the code for this use case.

The combinations "+DA2.0 +DS1.1" or "+DA2.0W +DS1.1" are impossible and don't make any sense.

MK
MK
H.Merijn Brand (procura
Honored Contributor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

Perfect explanation. I'd like to add that instead of +DA2.0w (or +DA2.0W), you better use +DD64, which means almost the same thing, but is much more portable accross all HP C-compilers, and works evenly well on PA-RISC as on Itanium (IPF) architectures.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ski Ride
Advisor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

H.Merijn and MK

Well anyway I can go with +DAPortable right? And this will enable me to compile in both PA-RISC and IPF machines.

Now one thing is that I need to check if the machine is a 32 or 64 bit processor and add the code accordingly as described by Merijin.

I am using `uname -m` which displays ia64 for IPF 64 machines.

Well I am curious to know what the output will be in other machines? (i.e) What will `uname -m` display in IPF 32,PA-RISC 32 and PA-RISC 64 machines? Is there any other architecture on which hp-ux can be run.
James R. Ferguson
Acclaimed Contributor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

Hi:

> Well I am curious to know what the output will be in other machines? (i.e) What will `uname -m` display in IPF 32,PA-RISC 32 and PA-RISC 64 machines? Is there any other architecture on which hp-ux can be run.

Itanium serers are _ONLY_ 64-bit machines. The output of 'uname -m' on those yields "ia64".

PA-RISC machines can be 32-bit or 64-bit as noted.

# getconf KERNEL_BITS

...will tell you the "bitness" of your current kernel, et.g. "64"

# getconf HW_CPU_SUPP_BITS

...will tell you the "bitness" your hardware will support, e.g. "32/64"

Both arguments to 'getconf' are invalid before any version of 11.x since it wasn't until 11.0 that 64-bit machines appeared.

Itanium servers _WILL_ run 32-bit PA-RISC or 64-bit PA-RISC code under it "ARIES" emulator:

http://docs.hp.com/en/B2355-60130/Aries.5.html

www.hp.com/go/aries

ARIES is intrinsically part of any Itanium server codeset.

Regards!

...JRF...
H.Merijn Brand (procura
Honored Contributor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

yes, +DAportable will run on all architectures, but it will have a great impact on performance if ran on PA-RISC2.0 or higher, as the code will not be optimized for the target architecture.

In general, one should target the lowest architecture that will be used and not go below that if possible.

If running +DAportable on IPF, the impact is doubled, as it has to use an emulation layer.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ski Ride
Advisor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

Thanks JRF,Merijin and yes Matti Kulkela... Your information was very help...

By the way if you have more information on these please post it.

Keep up the spirit. :)
Dennis Handly
Acclaimed Contributor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

>I would like to know what the options +DA1.1 and +DS1.1 is used for.

Take a look at the Online Help:
http://docs.hp.com/en/14672/Help/options.htm#option+DA
http://docs.hp.com/en/14672/Help/options.htm#opt+DSmodel

>MK: +DA2.0W generates 64-bit code

As H.Merijn said, this is obsolete, you should use +DD64 instead.

>+DS adjusts code optimization in the same way.

Not quite. For +DS, you should always use +DS2.0, since all recent CPUs support it. And it will still run in PA1.1 boxes.

> I can go with +DAPortable right? And this will enable me to compile in both PA-RISC and IPF machines.

No, the +DA option isn't supported on IPF compilers.
Ski Ride
Advisor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

Hey

I have one more question.

After taking a look at
http://www.docs.hp.com/en/92453-90085/ch09s02.html#bghdjbbe

"If you plan to run your program on the same system where you are compiling, you don't need to use +DA."

"If you plan to run your program on one particular model of the HP 9000 and that model is different from the one where you compile your program, use +DSmodel with either the model number of the target system or the processor name of the target system."

Now I think I need not specify the +DA and +DS options if I want to run on the machine on which it is complied. Am I correct?
Dennis Handly
Acclaimed Contributor

Re: what does these options mean while compiling +DA1.1 and +DS1.1

>I think I need not specify the +DA and +DS options if I want to run on the machine on which it is complied.

Yes. Most likely it will be +DA2.0/+DS2.0.