[Snort-devel] getting error while building snort-2.8.1 about asm

Steven Sturges steve.sturges at ...402...
Fri May 30 09:06:03 EDT 2008


Hi all--

We've had various remarks about using gcc on the HPUX IA platform.

Attached is a patch to cpuclock.h that should cover the issues
for both gcc and aCC.  Thanks to Pavan Raj for testing it out!

Cheers.
-steve

pendiala jaipal wrote:
> Hi All,
> 
> when i am trying to build snort-2.8.1 on HPUX IA platform with gcc 4.2.1 , i am getting error like 
> 
> /*
>  snort.c: In function 'ExitCheckStart':
> snort.c:1364: error: impossible register constraint in 'asm'
> 
> */
> 
> the macro which is giving error is 
> -------------------------------------------------------------------------
> #if (defined(__i386) || defined(__ia64) || defined(__amd64) )
> #define get_clockticks(val) \
> { \
>     u_int32_t a, d; \
>     __asm__ __volatile__("rdtsc" : "=a" (a), "=d" (d));  \
>     val = ((UINT64)a) | (((UINT64)d) << 32);  \
> }
> ------------------------------------------------------------------------------------------
> 
> and " asm " defination is given in cpuclock.h as 
> 
>  __asm
>     {
>        rdtsc;
>        mov dword  PTR [t],eax;
>        mov dword  PTR [t+4],edx;
>   }
> 
> Can you help me how to solve this issue.
> 
> I tried it with aCC also , but i was getting errors related to get_clockticks macro which is defined in cpuclock.h and used in snort.c
> 
> 
> Thanks in Advance,
> 
> Jaipal Reddy.
> 
> 
> 
>        
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Snort-devel mailing list
> Snort-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/snort-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuclock.h.diff
Type: text/x-patch
Size: 1345 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20080530/c0286f5f/attachment.bin>


More information about the Snort-devel mailing list