🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1075

Re: -G2 flag

#1075
From: Bill Ives
Date: Mon, 14 Jan 1991 18:35
23 lines
1389 bytes


     One thing the G2 switch does is generate 80286 entry and exit
     code for normal functions. I don't know if it makes any difference
     when Windows switches are used, but it does for normal C programming.
     Specifically, it will generate ENTER/LEAVE instructions around
     functions.... I think it also generates 286/386 shift and move
     derivatives ( not sure though ). These generally make shifting
     a register easier. i.e. on an 8086 you have to load CL to do a
     muliple shift in a single instruction (or have repeated single
     shift instructions ):
          mov  cl,4
          shl  ax,cl
     On a 286 it should become:  shl ax,4
     I think it will (or should) generate the PUSHA/POPA forms of
     register saving when the _saveregs directive is used in combination
     with the -G2 switch.

     Hope this helps a little

     Bill Ives
     HP CTD
Technical Details
Message-ID: <25400001@hpctdls.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool2.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!eos!shelby!unix!hplabs!hpcc05!col!hpctdlb!hpctdls!wei
References: <1991Jan11.145837.10871@athena.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool2.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!eos!shelby!unix!hplabs!hpcc05!col!hpctdlb!hpctdls!wei
From: wei@hpctdls.HP.COM (Bill Ives)
Newsgroups: comp.windows.ms.programmer
Subject: Re: -G2 flag
Message-ID: <25400001@hpctdls.HP.COM>
Date: 14 Jan 91 18:35:40 GMT
References: <1991Jan11.145837.10871@athena.mit.edu>
Organization: Hewlett-Packard CTD, Colo. Spgs.
Lines: 23