From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a3cdcbea47c1d198 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-27 12:16:13 PST Path: archiver1.google.com!news2.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: Accessing a register with a larger size from generic Date: Thu, 27 Sep 2001 14:16:50 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1001618170 5685 137.194.161.2 (27 Sep 2001 19:16:10 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 27 Sep 2001 19:16:10 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:13444 Date: 2001-09-27T14:16:50-05:00 Could it be that you need to use a 'Size clause on the call_code type so as to make it 32 bits instead of 8 bits? The friendly compiler probably thinks it's helping you by making your enumeration type 8 bits wide (assuming there are less than 256 enumerates). ----- Original Message ----- From: "Lutz Donnerhacke" Newsgroups: comp.lang.ada To: Sent: Thursday, September 27, 2001 1:31 PM Subject: Accessing a register with a larger size from generic > ------------------------------ > [...with, use, package (body), ...] > subtype long is Interfaces.C.long; > > type call_code is (KILL, FORK, EXIT, ...); > for call_code use (KILL => 1, FORK => 2, ...); > > generic > call : call_code; > type type1 is private; > function syscall1 (arg1 : type1) return long; > > function syscall1 (arg1 : type1) return long is > res : long; > begin > Asm ("int $0x80", > Outputs => long'Asm_Output ("=a", res), > Inputs => (call_code'Asm_Input ("0", call), > type1'Asm_Input ("b", arg1)), > Volatile => True); > return res; > end syscall1; > ------------------------------ > > generates code (using GNAT 3.13p) like: > movb $2, %al > xorw %bx, %bx > int 0x80 > instead of > movl $2, %eax > xorl %ebx, %ebx > int 0x80 > > > How can I change the type of the generated RTL expression to SI independed > of the generic type? > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >