[Bro-Dev] [JIRA] (BIT-1556) bro-2.4.1 fails to compile broker with -march=i686

Johanna Amann (JIRA) jira at bro-tracker.atlassian.net
Sun Mar 20 11:22:01 PDT 2016


     [ https://bro-tracker.atlassian.net/browse/BIT-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johanna Amann updated BIT-1556:
-------------------------------
    Resolution: No longer applies
        Status: Closed  (was: Open)

I think this one was fixed a while ago in master - which has special provisions for SSE2 support. That fix will make it into 2.5.

If you need it backported into 2.4.1, you should be able to just use the alternative pure c implementation in the ifdef of the master version of 2.5.

If I am mistaken and this is still a problem, feel free to reopen :)

For completeness - the code in the current version is:

{code}
#ifdef BROKER_USE_SSE2
                // Compare the key to all 16 stored keys
                __m128i cmp = _mm_cmpeq_epi8(_mm_set1_epi8(c),
                                             _mm_loadu_si128((__m128i*)p->keys.data()));

                // Use a mask to ignore children that don't exist
                int mask = (1 << n->num_children) - 1;
                int bitfield = _mm_movemask_epi8(cmp) & mask;

                if ( bitfield )
                        {
                        auto i = __builtin_ctz(bitfield);
                        return {&p->children[i], i};
                        }
#else
                for ( int i = 0; i < n->num_children; ++i )
                        if ( p->keys[i] == c ) return {&p->children[i], i};
#endif

{code}

> bro-2.4.1 fails to compile broker with -march=i686
> --------------------------------------------------
>
>                 Key: BIT-1556
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1556
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro, Broker
>    Affects Versions: 2.4
>         Environment: x86 chroot on Gentoo, with generic settings. E.g. -march=i686.
>            Reporter: M.B.
>              Labels: build
>         Attachments: build.log
>
>
> Build fails due to missing SSE support.



--
This message was sent by Atlassian JIRA
(v7.2.0-OD-03-014#72000)


More information about the bro-dev mailing list