public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001607] Cortex-M4F architectural Floating Point Support
Date: Thu, 28 Jun 2012 07:41:00 -0000	[thread overview]
Message-ID: <20120628074100.25A7B2F78001@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001607-104@http.bugs.ecos.sourceware.org/>

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001607

--- Comment #11 from Ilija Kocho <ilijak@siva.com.mk> 2012-06-28 08:40:46 BST ---
Hi Jifl

Here I revisit the CFLAGS

(In reply to comment #10)
> > - Here's a possible outline of a simplification. What do you think?
> >   cdl_option CYGHWR_HAL_CORTEXM_FPU_FLAGS {
> >      display    "FPU build flags"
> >      calculated { (CYGHWR_HAL_CORTEXM_FPU ? " -mfloat-abi=hard" : "" ) .
> > (CYGINT_HAL_CORTEXM_FPV4_SP_D16 ? " -mfpu=fpv4-sp-d16" : "" ) }
> >    }
> >    requires is_substr(CYGBLD_GLOBAL_CFLAGS, CYGHWR_HAL_CORTEXM_FPU_FLAGS )
> >    requires is_substr(CYGBLD_GLOBAL_LDFLAGS, CYGHWR_HAL_CORTEXM_FPU_FLAGS )
> >   requires { !CYGHWR_HAL_CORTEXM_FPU implies !is_substr(CYGBLD_GLOBAL_CFLAGS,
> > "-mfpu=fpv4-sp-d16") && !is_substr(CYGBLD_GLOBAL_CFLAGS, "-mfloat-abi=hard") }
> >   requires { !CYGHWR_HAL_CORTEXM_FPU implies !is_substr(CYGBLD_GLOBAL_LDFLAGS,
> > "-mfpu=fpv4-sp-d16") && !is_substr(CYGBLD_GLOBAL_LDFLAGS, "-mfloat-abi=hard") }
> 
> Since you ask me, I would get rid of is_substr(). Something like this:
> 
> cdl_option CYGHWR_HAL_CORTEXM_FLOAT_ABI_FLAG {
>       flavor data
>       no_define
>       display    "Float ABI flag"
>       calculated { CYGHWR_HAL_CORTEXM_FPU ? " -mfloat-abi=hard" : "" }
> }
> 
> cdl_option CYGHWR_HAL_CORTEXM_FPU_FLAG {
>       flavor data
>       no_define
>       display    "FPU build flags"
>       calculated { (CYGHWR_HAL_CORTEXM_FPU && CYGINT_HAL_CORTEXM_FPV4_SP_D16) ?
>                  " -mfpu=fpv4-sp-d16" : "" }
> }
> 
> Ditto for -mcpu=cortex-m3/m4 (CYGHWR_HAL_CORTEXM_CPU_FLAG).
> 
> Then we concatenate all these in CYGBLD_GLOBAL_CFLAGS.
> 
> cdl_option CYGBLD_GLOBAL_CFLAGS {
>     display "Global compiler flags"
>     flavor  data
>     no_define
>     default_value { CYGBLD_GLOBAL_WARNFLAGS . CYGHWR_HAL_CORTEXM_CPU_FLAG .
>        " -mthumb -g -O2 ffunction-sections -fdata-sections -fno-rtti
> -fno-exceptions" .
>        CYGHWR_HAL_CORTEXM_FLOAT_ABI_FLAG . CYGHWR_HAL_CORTEXM_FPU_FLAG }
> }
> 

I found out that this requires CYGBLD_GLOBAL_CFLAGS to be *calculated* instead
of *default_value*. I assume that it is not flexible enough so I revoke it.

Regarding your outline it looks nicer than the one I posted in the patch.
However it leaves some unresolved conflicts when I try to change code
generation by clicking the subject controls in configtool.
Actually I came to the construction from the submitted patch after pretty much
experimenting and my criterion was: least clicks that produce unresolved
conflicts. To explain what I mean, here's one example:

1. Create a configuration with "Freescale Kinetis TWR-K70F120M" default
template.
2. Deselect Cortex-M4 code.

Configtool shall report unresolved conflicts. (You can make it easier to
configtool if you deselect Hardware FPU prior to deselecting Cortex-M4). This
is AFAICT the only case that produces unresolved conflict for present CDL
construction. Other combinations that I have tried have more cases. I'm not
much familiar with CDL engine, but from my experience I would say that it is
easier to corner configtool to resolve the conflicts if expressions are
constants (rather than variables).

Cheers
Ilija

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

  parent reply	other threads:[~2012-06-28  7:41 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-03 12:57 [Bug 1001607] New: " bugzilla-daemon
2012-06-03 12:58 ` [Bug 1001607] " bugzilla-daemon
2012-06-03 12:59 ` bugzilla-daemon
2012-06-03 13:04 ` bugzilla-daemon
2012-06-03 13:05 ` bugzilla-daemon
2012-06-03 13:06 ` bugzilla-daemon
2012-06-03 14:22 ` bugzilla-daemon
2012-06-03 16:22 ` bugzilla-daemon
2012-06-06  6:33 ` bugzilla-daemon
2012-06-10 20:56 ` bugzilla-daemon
2012-06-22  4:56 ` bugzilla-daemon
2012-06-24 15:01 ` bugzilla-daemon
2012-06-28  7:41 ` bugzilla-daemon [this message]
2012-07-01  4:23 ` bugzilla-daemon
2012-07-08 16:51 ` bugzilla-daemon
2012-07-08 16:52 ` bugzilla-daemon
2012-07-08 16:53 ` bugzilla-daemon
2012-08-07  5:56 ` bugzilla-daemon
2012-08-07  5:57 ` bugzilla-daemon
2012-08-08 16:49 ` bugzilla-daemon
2012-08-08 17:14 ` bugzilla-daemon
2012-08-08 18:01 ` bugzilla-daemon
2012-08-08 19:28 ` bugzilla-daemon
2012-08-09  4:03 ` bugzilla-daemon
2012-08-09 10:12 ` bugzilla-daemon
2012-08-10 18:09 ` bugzilla-daemon
2012-08-10 18:14 ` bugzilla-daemon
2012-08-12 11:05 ` bugzilla-daemon
2012-08-29 19:34 ` bugzilla-daemon
2012-08-29 19:36 ` bugzilla-daemon
2012-08-29 19:37 ` bugzilla-daemon
2012-08-31 18:40 ` bugzilla-daemon
2012-08-31 18:42 ` bugzilla-daemon
2012-10-09 19:33 ` bugzilla-daemon
2012-11-06 20:54 ` bugzilla-daemon
2012-11-06 20:56 ` bugzilla-daemon
2012-11-06 20:57 ` bugzilla-daemon
2012-12-02 20:15 ` bugzilla-daemon
2012-12-02 20:18 ` bugzilla-daemon
2012-12-02 20:20 ` bugzilla-daemon
2012-12-02 20:21 ` bugzilla-daemon
2012-12-13  5:37 ` bugzilla-daemon
2012-12-16 15:51 ` bugzilla-daemon
2012-12-17  4:02 ` bugzilla-daemon
2012-12-17 14:05 ` bugzilla-daemon
2012-12-17 15:30 ` bugzilla-daemon
2012-12-21 13:42 ` bugzilla-daemon
2012-12-21 13:53 ` bugzilla-daemon
2013-02-06 21:29 ` bugzilla-daemon
2013-02-06 23:02 ` bugzilla-daemon
2013-02-06 23:08 ` bugzilla-daemon
2013-02-07  9:47 ` bugzilla-daemon
2013-02-07 21:52 ` bugzilla-daemon
2013-02-07 21:57 ` bugzilla-daemon
2013-02-07 21:59 ` bugzilla-daemon
2013-02-07 22:00 ` bugzilla-daemon
2013-02-09  2:08 ` bugzilla-daemon
2013-02-10 12:33 ` bugzilla-daemon
2013-02-10 17:30 ` bugzilla-daemon
2013-02-10 17:34 ` bugzilla-daemon
2013-02-16 14:34 ` bugzilla-daemon
2013-02-20  3:21 ` bugzilla-daemon
2013-03-07  0:16 ` bugzilla-daemon
2013-03-07  0:17 ` bugzilla-daemon
2013-03-07  0:18 ` bugzilla-daemon
2013-03-07  0:19 ` bugzilla-daemon
2013-03-07  1:46 ` bugzilla-daemon
2013-03-08 15:09 ` bugzilla-daemon
2013-03-09 22:49 ` bugzilla-daemon
2013-03-12 22:42 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120628074100.25A7B2F78001@mail.ecoscentric.com \
    --to=bugzilla-daemon@bugs.ecos.sourceware.org \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).