public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Replacing keyword in RISC-V Fortran
@ 2021-10-23  1:27 Amit Hmath
  2021-10-25  7:23 ` Arjen Markus
  0 siblings, 1 reply; 3+ messages in thread
From: Amit Hmath @ 2021-10-23  1:27 UTC (permalink / raw)
  To: fortran

Hello All,

I am working on a custom float in RISC-V 32, one can replace keyword
"float" with  custom keyword like "fp_custom" at line # 482
riscv-gcc/gcc/c-family/c-common.c. But in the case of Fortran,  can you
please tell which files to modify to replace the "float" keyword?

And also, in case of c/c++ one can do custom encoding and decoding of
custom floats in gcc/real.c how about in fortran for custom real data type,
which file(s) one has to modify?

Many Thanks,
-Amit

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

* Re: Replacing keyword in RISC-V Fortran
  2021-10-23  1:27 Replacing keyword in RISC-V Fortran Amit Hmath
@ 2021-10-25  7:23 ` Arjen Markus
  2021-10-26 11:28   ` Amit Hmath
  0 siblings, 1 reply; 3+ messages in thread
From: Arjen Markus @ 2021-10-25  7:23 UTC (permalink / raw)
  To: Amit Hmath; +Cc: Fortran List

I am not sure I understand your question correctly, but Fortran uses the
KIND mechanism to declare the precise characteristics of floating-point
variables and constants. Typically, these are identifying integer numbers
for single precision, double precision and quadruple precision. A custom
floating-point type would mean an additional KIND number with the relevant
runtime support and support from the various intrinsic functions and
modules In the directory gcc/fortran I find several source files that use
the typedef gfc_real_info and the array of kinds gfc_rel_kinds to deal with
floating-point data of various kinds. Would that help? (Caveat: I am a mere
beginner, and perhaps not even that, when it comes to the internals of the
GCC compiler suite)

Regards,

Arjen

Op za 23 okt. 2021 om 03:28 schreef Amit Hmath via Fortran <
fortran@gcc.gnu.org>:

> Hello All,
>
> I am working on a custom float in RISC-V 32, one can replace keyword
> "float" with  custom keyword like "fp_custom" at line # 482
> riscv-gcc/gcc/c-family/c-common.c. But in the case of Fortran,  can you
> please tell which files to modify to replace the "float" keyword?
>
> And also, in case of c/c++ one can do custom encoding and decoding of
> custom floats in gcc/real.c how about in fortran for custom real data type,
> which file(s) one has to modify?
>
> Many Thanks,
> -Amit
>

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

* Re: Replacing keyword in RISC-V Fortran
  2021-10-25  7:23 ` Arjen Markus
@ 2021-10-26 11:28   ` Amit Hmath
  0 siblings, 0 replies; 3+ messages in thread
From: Amit Hmath @ 2021-10-26 11:28 UTC (permalink / raw)
  To: Arjen Markus; +Cc: Fortran List

Thanks Arjen. Let me work on your comments.



On Mon, Oct 25, 2021 at 12:53 PM Arjen Markus <arjen.markus895@gmail.com>
wrote:

> I am not sure I understand your question correctly, but Fortran uses the
> KIND mechanism to declare the precise characteristics of floating-point
> variables and constants. Typically, these are identifying integer numbers
> for single precision, double precision and quadruple precision. A custom
> floating-point type would mean an additional KIND number with the relevant
> runtime support and support from the various intrinsic functions and
> modules In the directory gcc/fortran I find several source files that use
> the typedef gfc_real_info and the array of kinds gfc_rel_kinds to deal with
> floating-point data of various kinds. Would that help? (Caveat: I am a mere
> beginner, and perhaps not even that, when it comes to the internals of the
> GCC compiler suite)
>
> Regards,
>
> Arjen
>
> Op za 23 okt. 2021 om 03:28 schreef Amit Hmath via Fortran <
> fortran@gcc.gnu.org>:
>
>> Hello All,
>>
>> I am working on a custom float in RISC-V 32, one can replace keyword
>> "float" with  custom keyword like "fp_custom" at line # 482
>> riscv-gcc/gcc/c-family/c-common.c. But in the case of Fortran,  can you
>> please tell which files to modify to replace the "float" keyword?
>>
>> And also, in case of c/c++ one can do custom encoding and decoding of
>> custom floats in gcc/real.c how about in fortran for custom real data
>> type,
>> which file(s) one has to modify?
>>
>> Many Thanks,
>> -Amit
>>
>

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

end of thread, other threads:[~2021-10-26 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-23  1:27 Replacing keyword in RISC-V Fortran Amit Hmath
2021-10-25  7:23 ` Arjen Markus
2021-10-26 11:28   ` Amit Hmath

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).