Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: ccc and inline assembly...
  1999-11-28  9:42 ccc and inline assembly Mark Abene
@ 1999-11-28  9:27 ` Uncle George
  1999-11-28 12:47   ` Uncle George
  1999-11-28 18:44   ` Dan Frasnelli
  0 siblings, 2 replies; 8+ messages in thread
From: Uncle George @ 1999-11-28  9:27 UTC (permalink / raw)
  To: axp-list

So, i suppose that there is no docs for it.

gat

Mark Abene wrote:

> To whoever asked (I think it was Uncle George), the syntax for inline assembly
> with ccc is spelled out in /usr/lib/compaq/ccc-6.2/alpha-linux/include/c_asm.h
> complete with examples.
>
> Should be what you're looking for.
>
> -Mark
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* ccc and inline assembly...
@ 1999-11-28  9:42 Mark Abene
  1999-11-28  9:27 ` Uncle George
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Abene @ 1999-11-28  9:42 UTC (permalink / raw)
  To: axp-list

To whoever asked (I think it was Uncle George), the syntax for inline assembly
with ccc is spelled out in /usr/lib/compaq/ccc-6.2/alpha-linux/include/c_asm.h
complete with examples.

Should be what you're looking for.

-Mark


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly...
  1999-11-28  9:27 ` Uncle George
@ 1999-11-28 12:47   ` Uncle George
  1999-11-28 16:04     ` Mark Abene
  1999-11-28 18:44   ` Dan Frasnelli
  1 sibling, 1 reply; 8+ messages in thread
From: Uncle George @ 1999-11-28 12:47 UTC (permalink / raw)
  To: axp-list, alpha-c

Tried the example from c-asm.h. No <machine/pal.h> :-/.
even with that i cannot do "asm ( ".weak " "__sigprocmask");
i cannot tell if .weak is a boo boo, or whatever options there are.

    #include <c_asm.h>
#if 0
    #include <machine/pal.h>
#endif

   #define QUOTE(s) #s
   #define STR(s) QUOTE(s)
   #define WRUNIQ(uniq) asm("call_pal " STR(PAL_wruniq), (uniq))
   #define RDUNIQ() asm("call_pal " STR(PAL_rduniq))

   main()
       {
       int i = 123456;
       int j;

          WRUNIQ(i);

          j = RDUNIQ();

          printf("i=%d; j=%d\n", i, j);
         }
~


Uncle George wrote:

> So, i suppose that there is no docs for it.
>
> gat
>
> Mark Abene wrote:
>
> > To whoever asked (I think it was Uncle George), the syntax for inline assembly


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly...
  1999-11-28 12:47   ` Uncle George
@ 1999-11-28 16:04     ` Mark Abene
  1999-11-29 13:00       ` Uncle George
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Abene @ 1999-11-28 16:04 UTC (permalink / raw)
  To: axp-list, alpha-c

Maybe you could enlighten us on what you're trying to accomplish with
inline assembly, and I'll try to be more helpful.  :)
I can't say I've tried copying /usr/include/machine/pal.h from DU, but I
somehow doubt the GNU assembler in linux would know what a "PAL_callsys" was
supposed to do.  We don't have the benefit of DU's assembler macros.
But for simple user functions, a #define of an asm block of instructions
should work fine, as illustrated in the third example in c_asm.h.
I'm guessing you're trying to do something more complex?

-Mark

On Sun, Nov 28, 1999 at 07:47:08AM -0500, Uncle George wrote:
> Tried the example from c-asm.h. No <machine/pal.h> :-/.
> even with that i cannot do "asm ( ".weak " "__sigprocmask");
> i cannot tell if .weak is a boo boo, or whatever options there are.
> 
>     #include <c_asm.h>
> #if 0
>     #include <machine/pal.h>
> #endif
> 
>    #define QUOTE(s) #s
>    #define STR(s) QUOTE(s)
>    #define WRUNIQ(uniq) asm("call_pal " STR(PAL_wruniq), (uniq))
>    #define RDUNIQ() asm("call_pal " STR(PAL_rduniq))
> 
>    main()
>        {
>        int i = 123456;
>        int j;
> 
>           WRUNIQ(i);
> 
>           j = RDUNIQ();
> 
>           printf("i=%d; j=%d\n", i, j);
>          }
> ~
> 
> 
> Uncle George wrote:
> 
> > So, i suppose that there is no docs for it.
> >
> > gat
> >
> > Mark Abene wrote:
> >
> > > To whoever asked (I think it was Uncle George), the syntax for inline assembly
> 
> -- 
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly...
  1999-11-28  9:27 ` Uncle George
  1999-11-28 12:47   ` Uncle George
@ 1999-11-28 18:44   ` Dan Frasnelli
  1 sibling, 0 replies; 8+ messages in thread
From: Dan Frasnelli @ 1999-11-28 18:44 UTC (permalink / raw)
  To: axp-list

> So, i suppose that there is no docs for it.

ccc should be syntactically similar (the same, actually) as gemcc
under Tru64.  I'd suggest checking Digipaq's online doc library
for the needed info.

--
Dan Frasnelli
Security analyst


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly...
  1999-11-28 16:04     ` Mark Abene
@ 1999-11-29 13:00       ` Uncle George
  0 siblings, 0 replies; 8+ messages in thread
From: Uncle George @ 1999-11-29 13:00 UTC (permalink / raw)
  To: axp-list; +Cc: alpha-c

Try:
asm( ".weak " "_some_extern_routine");

Mark Abene wrote:

> Maybe you could enlighten us on what you're trying to accomplish with
> inline assembly, and I'll try to be more helpful.  :)
> I can't say I've tried copying /usr/include/machine/pal.h from DU, but I
> somehow doubt the GNU assembler in linux would know what a "PAL_callsys" was
> supposed to do.  We don't have the benefit of DU's assembler macros.
> But for simple user functions, a #define of an asm block of instructions
> should work fine, as illustrated in the third example in c_asm.h.
> I'm guessing you're trying to do something more complex?
>
> -Mark
>
> On Sun, Nov 28, 1999 at 07:47:08AM -0500, Uncle George wrote:
> > Tried the example from c-asm.h. No <machine/pal.h> :-/.
> > even with that i cannot do "asm ( ".weak " "__sigprocmask");
> > i cannot tell if .weak is a boo boo, or whatever options there are.
> >
> >     #include <c_asm.h>
> > #if 0
> >     #include <machine/pal.h>
> > #endif
> >
> >    #define QUOTE(s) #s
> >    #define STR(s) QUOTE(s)
> >    #define WRUNIQ(uniq) asm("call_pal " STR(PAL_wruniq), (uniq))
> >    #define RDUNIQ() asm("call_pal " STR(PAL_rduniq))
> >
> >    main()
> >        {
> >        int i = 123456;
> >        int j;
> >
> >           WRUNIQ(i);
> >
> >           j = RDUNIQ();
> >
> >           printf("i=%d; j=%d\n", i, j);
> >          }
> > ~
> >
> >
> > Uncle George wrote:
> >
> > > So, i suppose that there is no docs for it.
> > >
> > > gat
> > >
> > > Mark Abene wrote:
> > >
> > > > To whoever asked (I think it was Uncle George), the syntax for inline assembly
> >
> > --
> > To unsubscribe: send e-mail to axp-list-request@redhat.com with
> > 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> >
> >
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly
@ 1999-11-30 21:18 Pete Wyckoff
  1999-12-09 12:22 ` Uncle George
  0 siblings, 1 reply; 8+ messages in thread
From: Pete Wyckoff @ 1999-11-30 21:18 UTC (permalink / raw)
  To: gatgul; +Cc: axp-list

Uncle sez:
> Try:
> asm( ".weak " "_some_extern_routine");
>
> Mark Abene wrote:
>
> > Maybe you could enlighten us on what you're trying to accomplish with
> > inline assembly, and I'll try to be more helpful. :)

[ guessing at the hoped-for enlightenment ]

Notice that ccc uses DEC's assembler, not gas, hence it may not
even support ".weak", or not use that syntax.  Just don't know yet.

You can always work around your particular problem by using objcopy -W.

		-- Pete


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: ccc and inline assembly
  1999-11-30 21:18 Pete Wyckoff
@ 1999-12-09 12:22 ` Uncle George
  0 siblings, 0 replies; 8+ messages in thread
From: Uncle George @ 1999-12-09 12:22 UTC (permalink / raw)
  To: axp-list

Well, they seem to support #pragma weak (  a,b ). but in my case i just want
to make 1 symbol a weak reference
in the compile
gat

Pete Wyckoff wrote:

> Uncle sez:
> > Try:
> > asm( ".weak " "_some_extern_routine");
> >
> > Mark Abene wrote:
> >
> > > Maybe you could enlighten us on what you're trying to accomplish with
> > > inline assembly, and I'll try to be more helpful. :)
>
> [ guessing at the hoped-for enlightenment ]
>
> Notice that ccc uses DEC's assembler, not gas, hence it may not
> even support ".weak", or not use that syntax.  Just don't know yet.
>
> You can always work around your particular problem by using objcopy -W.
>
>                 -- Pete
>
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-12-09 13:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-11-28  9:42 ccc and inline assembly Mark Abene
1999-11-28  9:27 ` Uncle George
1999-11-28 12:47   ` Uncle George
1999-11-28 16:04     ` Mark Abene
1999-11-29 13:00       ` Uncle George
1999-11-28 18:44   ` Dan Frasnelli
  -- strict thread matches above, loose matches on Subject: below --
1999-11-30 21:18 Pete Wyckoff
1999-12-09 12:22 ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox